__declspec(dllexport) problem?
hi
in mvc++, in a non mfc dll, i got the function
__declspec(dllexport) void gi(int &i);
however, in vb, including the function by
public declare sub gi lib "..." (byref i as integer)
i get an error "cannot find dll entry point"
why is this, and how can i fix it?
What''s happening is that your function has tags added on to the end of it in the DLL that show what kind of parameters it takes.
You can see the real name of all the exported functions in a dll with the dumpbin command in the /VC98/bin directory (if you have VC 6). Just do something like this:
dumpbin /exports somethin.dll
To get rid of the tags at the end of your function, do this when you declare your it:
__declspec(dllexport) void PASCAL gi(int &i)
Hope this helps
NickW
You can see the real name of all the exported functions in a dll with the dumpbin command in the /VC98/bin directory (if you have VC 6). Just do something like this:
dumpbin /exports somethin.dll
To get rid of the tags at the end of your function, do this when you declare your it:
__declspec(dllexport) void PASCAL gi(int &i)
Hope this helps
NickW
i figured it out, i declare my functions with _stdcall, and i add them to a .def file.
however, vb only lets me access them through the declare statement.
i need to be able to allow access to variables and things, which the declare statement doesnt allow..
i need to be able to add a refrence to my dll in the vb refrences menu, however, vb doesnt let me do this.
what do i need to do to make my dll compatable as a vb refrence?
however, vb only lets me access them through the declare statement.
i need to be able to allow access to variables and things, which the declare statement doesnt allow..
i need to be able to add a refrence to my dll in the vb refrences menu, however, vb doesnt let me do this.
what do i need to do to make my dll compatable as a vb refrence?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement