On Jul 28, 3:21 pm, Victor Bazarov <v.Abaza...@comAcast.net> wrote:
nik wrote:
I've got a .dll built in VS 2008 in C++, and an .exe in VB. When I use
thedebugversion of the .dll the application works perfectly. Once I
switch the .dll to thereleasebuild I get a
System.EntryPointNotFoundExceptionwhen trying to call a function of
the .dll's. How is it that thedebugbuild works, but therelease
doesn't? How can I fix this?
I've looked online and can't find anyone else having this sort of
issue, so I would really appreciate any hints or clues that would help
me solve this.
'EntryPointNotFound' sounds like your function isn't exported the same
way inDebugandRelease. Either the export specification is different
(or missing) or the name/parameters differ between configurations...
Without seeing the code/settings it's a wild guess.
V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
It is pretty simple test code actually. I don't have any ifdefs in the
code which would cause changes in the code.
There is basically a .h with
__declspec(dllexport) WORD NumberCalc(WORD, WORD, WORD);
and a .cpp with
__declspec(dllexport) WORD CzconsultApp::NumberCalc(WORD num1,
WORD num2,
WORD num3)
and then I call into the DLL from a VB application that is setup with
Declare Function NumberCalc Lib "DLLtest.dll" (ByVal Number1 As
Short, ByVal Number2 As Short, ByVal Number3 As Short) As Short ' Call
DLL function to calculate a value
Are there any properties that I should be looking at.
Ah... clarity. The identifier of that function is not "NumberCalc". It is the decorated name version of
This is a member function of a class, and VB.NET doesn't know anything about C++ classes. Besides that, class member functions
can't be called directly without an instance of the class (unless they are static members).
It looks like what you want to do is create a C-style wrapper for that class method that actually will create an instance af the
class and call the member. The wrapper could then be exported by your DLL and imported by VB.NET.