Foundation > Packaging Rogue Wave Views Applications > Adding a Resource File to a Windows DLL
 
Adding a Resource File to a Windows DLL
You must add the following lines to any dll module:
#include <windows.h>
#include <ilviews/macros.h>
 
extern "C" {
void _declspec(dllimport) IlvAddHandleToResPath(long, int);
void _declspec(dllimport) IlvRemoveHandleFromResPath(long);
}
 
BOOL WINAPI
DllEntryPoint(HINSTANCE instance, DWORD reason, LPVOID)
{
switch (reason) {
case DLL_PROCESS_ATTACH:
IlvAddHandleToResPath((long)instance, -1);
return 1;
case DLL_PROCESS_DETACH:
IlvRemoveHandleFromResPath((long)instance);
return 0;
}
return 0;
}
BOOL WINAPI
DllMain(HINSTANCE hinstance, DWORD reason, LPVOID reserved)
{
return DllEntryPoint(hinstance, reason, reserved);
}

Version 6.0
Copyright © 2015, Rogue Wave Software, Inc. All Rights Reserved.