Drivers Category

Drivers Update
Drivers

How to compile dll in visual studio 2008

Version: 27.59.39
Date: 04 April 2016
Filesize: 1.21 MB
Operating system: Windows XP, Visa, Windows 7,8,10 (32 & 64 bits)

Download Now

If the tutorial is too fast for you then read the following steps: 1. Start Visual Studio (or C+ Express Edition) -> Create a new Win32 Console Application project -> Application Settings -> Check DLL and Empy Project -> Hit Finish 2. Go to Solution Explorer -> Right Click on Header Files -> Add a new header file -> Declare your stuff (for example: a new class) / Simple H.h namespace nmspace class myclass public: static _declspec(dllexport) void Crap ; NOTE: The dllexport and dllimport storage-class attributes are Microsoft-specific extensions to the C and C+ languages. They enable you to export and import functions, data, and objects to and from a DLL. 3. Go to Solution Explorer -> Right Click on Source Files -> Add a new cpp file -> Include your header here include Your Header.h and define your stuff / Simple CPP.cpp include using namespace std; include Simple H.h namespace nmspace void myclass: Crap cout < I'm called within a crappy DLL! ; 4. Create a new Win32 Console Application project -> Application Settings -> Leave Console application checked and check Empty Project -> Add a new CPP file (for example: main.cpp) 5. Go to your DLL Project folder and copy the Header file ( Simple H.h the Object Library File ( Simple DLL.lib) and the DLL itself ( Simple DLL.dll)! Paste these files into your new project folder (where main.cpp is located) 6. Include the Header file ( Simple H.h) to your new project -> Go to Solution Explorer -> Right Click on the Project name ( NOT THE SOLUTION) -> References 7. Configuration Properties -> Linker -> Input -> Additional Dependencies -> Add the.lib file ( Simple DLL.lib) -> Hit OK -> HIT APPLY and then OK! 8. In main.cpp call the function from the DLL created -> Start the application / main.cpp include Simple H.h include using namespace std; using namespace nmspace; int main myclass: Crap system( PAUSE.
Please help me on this, its really irritating may be because i am doing it for the first time and have no experience. Aim : to find factorial of a number. STEP 1: Creating new project of type VC+ MFC and in templates MFC DLL STEP 2: Then comes create a regular DLL ( MFC shared) i say Yes STEP 3: I create header file ( Server Header.h) with the following code _declspec (dllimport) int factorial(int no STEP 4 : I create cpp file ( Server Factorial.cpp) with the code include stdafx.h _declspec (dllexport) int factorial(int no) return no = 0? 1 : no * factorial(no-1 STEP 5 : i BUILD the project and everything is fine STEP 6 : I create another project Client of VC+ Win32 and in templates Win32 Console Application with application setting as EMPTY PROJECT and create a new cpp file ( Main Class.cpp) with the code include Server Header.h include void main int no,i; cout< Enter number ; cin>no; i=factorial(n / calling the method cout

© 2012-2016 dianandrefsimp.5v.pl