home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Beginning C++ Through Gam…rogramming (2nd Edition)
/
BCGP2E.ISO
/
bloodshed
/
devcpp-4.9.9.2_setup.exe
/
Templates
/
Dll_c.txt
< prev
next >
Wrap
Text File
|
2003-02-12
|
788b
|
35 lines
/* Replace "dll.h" with the name of your header */
#include "dll.h"
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
DLLIMPORT void HelloWorld ()
{
MessageBox (0, "Hello World from DLL!\n", "Hi", MB_ICONINFORMATION);
}
BOOL APIENTRY DllMain (HINSTANCE hInst /* Library instance handle. */ ,
DWORD reason /* Reason this function is being called. */ ,
LPVOID reserved /* Not used. */ )
{
switch (reason)
{
case DLL_PROCESS_ATTACH:
break;
case DLL_PROCESS_DETACH:
break;
case DLL_THREAD_ATTACH:
break;
case DLL_THREAD_DETACH:
break;
}
/* Returns TRUE on success, FALSE on failure */
return TRUE;
}