Click here to Skip to main content
16,016,475 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Geting width of my CListbox - Thx Pin
4-May-02 16:10
suss4-May-02 16:10 
GeneralSetting Permanent Margins CEditView :: MFC Pin
valikac4-May-02 12:31
valikac4-May-02 12:31 
GeneralAccesing other programs Pin
4-May-02 11:23
suss4-May-02 11:23 
GeneralRe: Accesing other programs Pin
Gabriel.P.G4-May-02 13:12
Gabriel.P.G4-May-02 13:12 
GeneralRe: Accesing other programs Pin
Nish Nishant4-May-02 14:58
sitebuilderNish Nishant4-May-02 14:58 
GeneralUnresolved External Symbol :( Pin
Derek Lakin4-May-02 11:11
Derek Lakin4-May-02 11:11 
GeneralExporting Classes Pin
Peter Liddle4-May-02 10:45
Peter Liddle4-May-02 10:45 
GeneralRe: Exporting Classes Pin
Paul M Watt4-May-02 12:17
mentorPaul M Watt4-May-02 12:17 
This example was generated by the app wizards for a DLL.

Here is the header file:
// The following ifdef block is the standard way of creating macros which make exporting 
// from a DLL simpler. All files within this DLL are compiled with the EXAMPLE_EXPORTS
// symbol defined on the command line. this symbol should not be defined on any project
// that uses this DLL. This way any other project whose source files include this file see 
// EXAMPLE_API functions as being imported from a DLL, wheras this DLL sees symbols
// defined with this macro as being exported.
#ifdef EXAMPLE_EXPORTS
#define EXAMPLE_API __declspec(dllexport)
#else
#define EXAMPLE_API __declspec(dllimport)
#endif

// This class is exported from the example.dll
class EXAMPLE_API CExample {
public:
	CExample(void);
	// TODO: add your methods here.
};

extern EXAMPLE_API int nExample;

EXAMPLE_API int fnExample(void);

Here is the cpp file:
// example.cpp : Defines the entry point for the DLL application.
//

#include "stdafx.h"
#include "example.h"

BOOL APIENTRY DllMain( HANDLE hModule, 
                       DWORD  ul_reason_for_call, 
                       LPVOID lpReserved
					 )
{
    switch (ul_reason_for_call)
	{
		case DLL_PROCESS_ATTACH:
		case DLL_THREAD_ATTACH:
		case DLL_THREAD_DETACH:
		case DLL_PROCESS_DETACH:
			break;
    }
    return TRUE;
}


// This is an example of an exported variable
EXAMPLE_API int nExample=0;

// This is an example of an exported function.
EXAMPLE_API int fnExample(void)
{
	return 42;
}

// This is the constructor of a class that has been exported.
// see example.h for the class definition
CExample::CExample()
{ 
	return; 
}


Good Luck!



Build a man a fire, and he will be warm for a day
Light a man on fire, and he will be warm for the rest of his life!

GeneralRe: Exporting Classes Pin
Tom Archer4-May-02 13:58
Tom Archer4-May-02 13:58 
GeneralOverrides using Properties window in VC++ .NET Pin
4-May-02 9:31
suss4-May-02 9:31 
QuestionWhere should I post my TurboC++ / ASM / BIOS question? Pin
Maxwell Chen4-May-02 8:38
Maxwell Chen4-May-02 8:38 
GeneralArray of pointers Pin
Rohde4-May-02 8:16
Rohde4-May-02 8:16 
GeneralRe: Array of pointers Pin
Nish Nishant4-May-02 8:29
sitebuilderNish Nishant4-May-02 8:29 
GeneralRe: Array of pointers Pin
Paul M Watt4-May-02 9:22
mentorPaul M Watt4-May-02 9:22 
GeneralRe: Array of pointers Pin
Maxwell Chen4-May-02 9:33
Maxwell Chen4-May-02 9:33 
GeneralRe: Array of pointers Pin
Christian Graus4-May-02 11:34
protectorChristian Graus4-May-02 11:34 
GeneralRe: Array of pointers Pin
Maxwell Chen4-May-02 20:57
Maxwell Chen4-May-02 20:57 
GeneralSetting Up Option Parameters :: C++ Pin
valikac4-May-02 7:19
valikac4-May-02 7:19 
GeneralRe: Setting Up Option Parameters :: C++ Pin
Ravi Bhavnani4-May-02 7:27
professionalRavi Bhavnani4-May-02 7:27 
GeneralRe: Setting Up Option Parameters :: C++ Pin
Maxwell Chen4-May-02 8:14
Maxwell Chen4-May-02 8:14 
GeneralRe: Setting Up Option Parameters :: C++ Pin
valikac4-May-02 8:22
valikac4-May-02 8:22 
GeneralClass scope.... Pin
Maxwell Chen4-May-02 8:28
Maxwell Chen4-May-02 8:28 
GeneralRe: Class scope.... Pin
Ravi Bhavnani4-May-02 9:30
professionalRavi Bhavnani4-May-02 9:30 
GeneralRe: Class scope.... Pin
Maxwell Chen4-May-02 9:37
Maxwell Chen4-May-02 9:37 
GeneralRe: Setting Up Option Parameters :: C++ Pin
Maxwell Chen4-May-02 8:19
Maxwell Chen4-May-02 8:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.