// T5BLOCKS.cpp : Defines the entry point for the DLL application. // #include "stdafx.h" #define DLL_API __declspec(dllexport) //#define RD5 // Please fill out your own informations. // ------------------------------------------------------------------------- LPCTSTR libinfo = _T("Add Your DLL information here."); LPCTSTR libVer = _T("Add DLL version here."); // ------------------------------------------------------------------------- BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { // Perform actions based on the reason for calling. switch( ul_reason_for_call ) { case DLL_PROCESS_ATTACH: // Initialize once for each new process. // Return FALSE to fail DLL load. break; case DLL_THREAD_ATTACH: // Do thread-specific initialization. break; case DLL_THREAD_DETACH: // Do thread-specific cleanup. break; case DLL_PROCESS_DETACH: // Perform any necessary cleanup. break; } return TRUE; } DLL_API BOOL T5Blocks_IsValid (void) { return TRUE; } // This is an example of an exported function. DLL_API void Project_Begin(void) { //Put you code in the below //This function will be called one time when a project starts. } DLL_API void Project_End(void) { //Put you code in the below //This function will be called one time when a project stops. } DLL_API LPCTSTR T5Blocks_GetBlockName (DWORD dwIndex) { switch (dwIndex) { case 1 : return L"BYTES_TO_LONG"; case 2 : return L"LONG_TO_BYTES"; /* should continue with contiguous numbers... */ } return NULL; } LPCTSTR DLL_API GetLibInfo(LPCTSTR *info) { int len = _tcslen((LPCTSTR)libinfo); if(info) *info = libinfo; return libinfo; } LPCTSTR DLL_API GetLibVer(LPCTSTR *Ver) { int len = _tcslen((LPCTSTR)libVer); if(Ver) *Ver = libVer; return libVer; }