DLL From VB to use in VC++

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, i made a VB.net dll....i want to kno how i can use it in C++. I kno i
need to make it a com object and how to call it. ive looked at several
websites and none of them seem to work bc i dont understand it....so if
anyone can any help id be grateful....thanks

-iwdu150
 
If you are forced to use native C++, you have to use COM Interop, indeed.
Here is how you can do this:

tlbExp myVBdotNETLib.dll

generates a .tlb file

in your C++ code:
#import "myVBdotNETLib.tlb"

However if you can use the managed features of C++, it is much easier, since
you just need to reference the managed dll in order to use it's types from
managed code. You can import this either via
#using "myVBdoNETLib.dll"
or via the compiler switch /FU, use VS.NET project settings for that.

Marcus Heege
 
sorry for my n00b question but my class hasnt covered some of thi stuff
yet...what is "native" c++? and whats the differennce bertween it and the
opposite of it and how can i tell ? thanks
 
Native C++ is plain old C++ programs where you do not use any of the
Managed .Net classes or compile with the /clr option.

----------------
-Atul, Sky Software http://www.ssware.com
Shell MegaPack For .Net & ActiveX
Windows Explorer GUI Controls
&
Quick-Launch Like Appbars, MSN/Office2003 Style Popups,
System Tray Icons and Shortcuts/Internet Shortcuts
 
Back
Top