How to Build Pre.NET DLL from VS.NET C++

  • Thread starter Thread starter Joe Hoggood
  • Start date Start date
J

Joe Hoggood

I have some platform portable TCP socket code written in C that I want to
run on Unix, VMS and Win32 platforms. I am using VS.NET 2003 to develop and
manage this code using a C++ project under the solution.

I want to build this C code in such a way (a pre.NET DLL I suppose but you
tell me) that I can call this code from a VB6 application. My question is
how do I setup my build process in the C++ project to target the appropriate
thing (ex. library, DLL, etc.) so that it can be called from VB6. I had in
my mind that this target would look to VB6 like say a Win32 API maybe?

Thanks

Joe Hoggood
 
File | New Project | VC++ | Win32 Project | DLL | Export Symbols

Then export the API you want visible to VB6 as C API
extern "C" __declspec(dllexport) void somefunc();

Also, .def file can be used instead to declare your exported functions.
 
Hello Joe,

Thanks for posting in the group.

I agreed with Pent that if you want to create a typical Win32 DLL, you
could just create a new project in VC++ application wizard as:
Win32 Project->DLL.

Don't create project like Managed C++ class library. It is often used under
.NET and can't be used by VB 6.0 directly as typical Win32 DLLs.

Does that answer your question? If there is anything unclear, please feel
free to post here.

Best regards,
Yanhong Huang
Microsoft Online Partner Support

Get Secure! ¨C www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top