473,466 Members | 1,336 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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

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
Nov 16 '05 #1
2 1462
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.

"Joe Hoggood" <jh******@jhoggood.com> wrote in message
news:vr************@corp.supernews.com...
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

Nov 16 '05 #2
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.

Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: AIM | last post by:
Error in msvc in building inheritance.obj to build hello.pyd Hello, I am trying to build the boost 1.31.0 sample extension hello.cpp. I can not compile the file inheritance.cpp because the two...
10
by: Douglas Buchanan | last post by:
I am using the following code instead of a very lengthly select case statement. (I have a lot of lookup tables in a settings form that are selected from a ListBox. The data adapters are given a...
2
by: Rudy Ray Moore | last post by:
How can I modify the project build order of a multi-project workspace under "Visual Studio .net 2003 7.1 c++"? I tried to modify the .sln by hand to influence the build order, but it didn't seem...
3
by: Julian | last post by:
Build.Net is a build tool that parses and builds VS.NET project files. Build.Net is run from the command line. It recursively searches a directory for VS.NET project files to build. This...
0
by: Andrew Ayre | last post by:
Hi, I can't seem to get the library built, and any help is greatly appreciated. Here is the info: Windows XP Borland C++ Builder 5 Latest Boost source code (downloaded at the weekend) Windows...
1
by: AlexZh | last post by:
Hi, I'd like to stop command line build by one project build failed. To do that I've created simple AddIn (see code below), that works fine for IDE and does not work for command line. In the AddIn...
5
by: eranshuman | last post by:
Hi, I m very new to perl I m running an API which have the Buil.pl When Im compiling using perl Build.pl I was getting error : Can't locate Module/Build.pm in @INC (@INC contains:...
0
by: Akira Kitada | last post by:
Hi list, I was trying to build Python 2.6 on FreeBSD 4.11 and found it failed to build some of the modules. """ Failed to find the necessary bits to build these modules: _bsddb ...
0
by: M.-A. Lemburg | last post by:
On 2008-10-25 08:39, Akira Kitada wrote: Please post a bug report on python.org about these failures. The multiprocessing module is still fairly new and obviously needs more fine tuning for...
0
by: Akira Kitada | last post by:
Hi Marc-Andre, Thanks for the suggestion. I opened a ticket for this issue: http://bugs.python.org/issue4204 Now I understand the state of the multiprocessing module, but it's too bad to see...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.