use of "SECTION" within a hook dll ..?
-
hi to all i want to store some string datas in a CString or similar variable and i need a int variable also this is a global hook dll and i want to update this variables at runtime and all applications should access to this variables which load this dll simly : i can say this dll will be a bridge between applications which load this dll i have found the following sample but i could not write a working one from it application exits with crash always note: the following sample copied from a C project and my dll is a MFC/C++ dll thank you
#pragma data_seg(".shared")
#pragma comment(linker, "/section:.shared,rws")HHOOK g_hHook = 0;
HWND g_hwndNotify = 0;
BOOL g_FirstInstance = FALSE;UINT g_nButtonCmdId[MAX_TITLE_BUTTONS] = { 0 };
UINT g_nButtonResId[MAX_TITLE_BUTTONS] = { 0 };
int g_nButtonCount = 0;WCHAR g_szBlackList[MAX_BLACKLIST][64] = { 1 };
LONG g_nBlackListLen = 0;#pragma data_seg()