Thanks for replying! My declarations are similar to the following:
C++ DLL:
void TestFunc()
{
[...]
}
TestFunc is exported by *.def entry.
Now, I want to import this in my .net application:
Public Declare Sub TestFunc lib "mydll.dll" ()
When I call TestFunc in my .net application I receive a DllNotFound
exception. For testing purposes I created a DLL from scratch using VS2005
(the original DLL was converted from VS2003 -> MultiByte) and Unicode charset
- it works perfectly...
Any ideas?
Thanks,
Peter
"Daniel O'Connell [C# MVP]" wrote:
>
> "Peter Schmitz" <(E-Mail Removed)> wrote in message
> news:5C017269-70FE-4331-A3A4-(E-Mail Removed)...
> > Hi,
> >
> > I've got a rather old DLL that compiles properly with the 'Multi byte
> > charset' option under VS2005. Now, I cannot call any functions of this dll
> > out of a VB .net application (would need 'Use Unicode' option for that..).
> > As
> > I do not want to rewrite the whole application for unicode usage: Is there
> > any way to call functions out of this DLL in a .net 2.0 application?
>
> What do you mean by "can't call" it? If you mean you need to marshal strings
> into unicode to send them, that can be set with the CharSet field of the
> DllImport attribute.
> >
> > Thanks,
> >
> > Peter
>
>
>
|