> > I have a VB.NET dll that I'd like to be able to use in a VC++.NET
> > application (all using VS.NET 2003). all the documentation I've found
[quoted text clipped - 17 lines]
> Regards,
> Will
I was under the impression that the app was targeting .net, but it's a third
party project template that I'm not too familiar with. Given that just
importing the DLL hasn't worked, I'll try the interop services method you
have linked to; I'm out of other ideas, so why not!
Thanks for your help.
Si
Simon Smith - 23 Nov 2006 16:54 GMT
OK. So I've done this and I now get a message "A namespace with this name
does not exist"
I've checked the registry after the regasm bits and pieces, and I've spelt
the namespace right in the cpp.
The only thing I couldn't do from your example was the [ClassInterface] bit;
I can't find any reference to this in VB.net
William DePalo [MVP VC++] - 24 Nov 2006 05:33 GMT
> I was under the impression that the app was targeting .net, but it's a
> third
> party project template that I'm not too familiar with. Given that just
> importing the DLL hasn't worked, I'll try the interop services method you
> have linked to; I'm out of other ideas, so why not!
Well, the sample wo which I pointed to is for interoperating between the
Win32 and .Net platforms. If you are targetting .Net in the pieces written
in C++, my sample is beside the point.
If you are not sure what you have you can inspect the switches on the
compiler and linker command lines. If you are compiling with /clr and
linking against mscoree.lib than you are targetting .Net
Regards,
Will
Simon Smith - 24 Nov 2006 10:24 GMT
> > I was under the impression that the app was targeting .net, but it's a
> > third
[quoted text clipped - 12 lines]
> Regards,
> Will
The C++ parts are targeting Win32, so the sample is valid. I still can't get
it to work, though. I've checked the registry and I'm using the correct class
names and files, but whatever I do I get a "undeclared identifier" error when
I try to reference anything using the class name.