473,725 Members | 2,168 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to make a win32 dll with VC++ express

I'm used to make a DLL with GCC where it's rather simple (tag your function
with __decl(dllexpor t) andf that's it).
How do I do the same thing with VC++ express?

I try to show a friend how to use his legacy C library with .NET.
I rather do everything in VC++ for a change instead of compiling with
makefile & gcc.

In my project I plan to create a C++/CLR Winform project
And a 'native dll' project

I added an empty project which I set to be a library.
Now I know I should create things like .lib file and reference them in the
other project, but I'm not quite sure how to do that..

Any tips? clues? links? advices?
Nov 19 '05 #1
1 2431
found it!
in fact it just works!
you just have to mark your exproted function with an infamous
DLLIMPORT/EXPORT define which depends on the ocntext...

"Lloyd Dupont" <net.galador@ld > wrote in message
news:u4******** ******@TK2MSFTN GP14.phx.gbl...
I'm used to make a DLL with GCC where it's rather simple (tag your
function with __decl(dllexpor t) andf that's it).
How do I do the same thing with VC++ express?

I try to show a friend how to use his legacy C library with .NET.
I rather do everything in VC++ for a change instead of compiling with
makefile & gcc.

In my project I plan to create a C++/CLR Winform project
And a 'native dll' project

I added an empty project which I set to be a library.
Now I know I should create things like .lib file and reference them in the
other project, but I'm not quite sure how to do that..

Any tips? clues? links? advices?

Nov 19 '05 #2

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

Similar topics

5
2215
by: Bryan Parkoff | last post by:
Please provide me the information when it is not in the correct newsgroups. I have been using C and C++ language for a long time when it is time for me to learn Win32 API functions that they can be written in C and C++ language. Please give me an advice where I should post to discuss this topic to the correct newsgroups. Also, where can I obtain the best textbook to learn and understand how Win32 API functions work in C / C++ language. ...
12
1498
by: John Gabriel | last post by:
lThe compiler output report is seldom correct: Problems here involve not being able to generate an accurate compile report. There are so many problems and I am not on Microsoft's payroll. Neither do I plan to help them fix such a buggy product. The IDE closes down unexpectedly: For no reason at all, the IDE aborts (shuts down); prompts for permission to send an error report to Microsoft. Debug windows: There are problems with variables...
14
1536
by: Lloyd Dupont | last post by:
it's only 2 hours I'm using it and I'm already mad from it's unproductivity feature. - my most hated feature being: you can't save your file (because it's used by VC# express). Very typicall after a failed build there are minor ones as well kind of, such as: - take 20 seconds to save a file. => which gives: before compiling spend 10 minutes saving files
7
1710
by: Mihajlo Cvetanović | last post by:
Hi all, I've been trying to find some info on Visual C++ 2005 Standard on Microsoft's site, but wasn't able to find any. There's only VC++ 2005 Express Edition, and Visual Studio 2005 Standard, Professional and Team System. What is the future of VC++ 2005 Standard? Can I somehow buy only VC++ in VS 2005 Standard?
11
1998
by: Zytan | last post by:
Most code on the net is wrong. This is SendMessage(): LRESULT SendMessage(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); All of those parameters are 32/64-bit in size depending on the compiler, except for UINT which is a C int, which is always 32-bit, even on a 64-bit machine, AFAIK. Most code on the net uses C# int (32- bit) for all (or some) of these, when it should use IntPtr, which is 32/64-bit.
67
733
by: Nimmi Srivastav | last post by:
Apologies if my cross posting has offended anyone.... For a pure hobbyist C/C++ programmer, who wants to develop applications to run on Windows, what would be a better choice to install: Visual C++ Express 2005 Edition or lcc-win32? Does anyone have any opinion to share? Also, is there a C++ compiler akin to lcc-win32? Thanks,
6
2642
by: meyzhong | last post by:
Hi, I am new to Visual C++ (6.0). I want to put all the print information in different lines into a box. I create a EDIT dialogue box, and then add a CString variable (m_MSG) to the dialogue box to display the print information in the box. However, the print information displayed in the box is in one line, like this "10.0| 20.0". The "\n" character for the change to a new line has not been recognized.
11
2035
by: kimiraikkonen | last post by:
Hello, I'm very new to C# and just installed VC# 2005 express edition and i have VB 2005 express installed previously. But i saw a thing which may be called as a "Visual C# 2005 express" bug? For example, in VB 2005 express while i was coding, if there's a coding error, errors are displayed in error list below the screen immediately during coding and before starting debugging. But in VC# 2005 express, if there's a coding error,...
2
2493
by: ChaosMageX | last post by:
I copied some code from a Mono 2.4 library to use in my own application. I'm getting a problem because one of the variable declarations involves the keyword "pinned" between the identifier and the instance name. public override unsafe void PutBytes(byte dest, int destIdx, double value) { base.Check(dest, destIdx, 8); byte* pinned numPtr = $(dest); long* numPtr2 = (long*) &value; *((long*) numPtr) = numPtr2; numPtr =...
0
9401
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9257
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9176
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9113
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8097
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6702
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4519
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4784
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3221
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 we have to send another system

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.