// Unmanaged.cpp : Defines the entry point for the DLL application. // #include "stdafx.h" #include "Unmanaged.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 UNMANAGED_API int nUnmanaged=0; // This is an example of an exported function. UNMANAGED_API int fnUnmanaged(LPCTSTR lpszMessage) { return MessageBox(NULL, lpszMessage, _T("Unmanaged"), MB_OK | MB_ICONEXCLAMATION); } // This is the constructor of a class that has been exported. // see Unmanaged.h for the class definition CUnmanaged::CUnmanaged() { return; }
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)