SendMessage compatible with DLL
-
Hello, I am trying to 'SendMessage' thru a DLL, can i do this? i Have written following code in DLLMain =================================================================== AppLog *app = new AppLog; if(!app) return TRUE; wcscpy(app->strAppName,strTemp); COPYDATASTRUCT cpd; cpd.cbData = sizeof(AppLog); cpd.dwData = 0; cpd.lpData = (PVOID)app; MessageBox(NULL,app->strAppName , L"Copied exe Name", 0); BOOL bRet = SendMessage(hCompactEngine, WM_COPYDATA, (WPARAM)1, (LPARAM)&app); DWORD dwret = GetLastError(); =================================================================== Here dwret = 120 (This function is not supported on this system.) Can anybody help me with this. Am i missing anything.
-
Hello, I am trying to 'SendMessage' thru a DLL, can i do this? i Have written following code in DLLMain =================================================================== AppLog *app = new AppLog; if(!app) return TRUE; wcscpy(app->strAppName,strTemp); COPYDATASTRUCT cpd; cpd.cbData = sizeof(AppLog); cpd.dwData = 0; cpd.lpData = (PVOID)app; MessageBox(NULL,app->strAppName , L"Copied exe Name", 0); BOOL bRet = SendMessage(hCompactEngine, WM_COPYDATA, (WPARAM)1, (LPARAM)&app); DWORD dwret = GetLastError(); =================================================================== Here dwret = 120 (This function is not supported on this system.) Can anybody help me with this. Am i missing anything.
tony_udz wrote:
BOOL bRet = SendMessage(hCompactEngine, WM_COPYDATA, (WPARAM)1, (LPARAM)&app);
app, but you want to send cpd right?