Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Windows.h>
- HDDEDATA CALLBACK DdeCallback(UINT uType, UINT uFmt, HCONV hconv, HSZ hsz1, HSZ hsz2, HDDEDATA hdata, ULONG_PTR dwData1, ULONG_PTR dwData2)
- {
- return 0;
- }
- int main(int argc, char *argv[])
- {
- DWORD idInst = 0;
- UINT result = DdeInitialize(&idInst, &DdeCallback, APPCLASS_STANDARD | APPCMD_CLIENTONLY, 0);
- if (result != DMLERR_NO_ERROR)
- return result;
- HSZ hszService = DdeCreateStringHandle(idInst, L"AcroViewR11", CP_ACP);
- HSZ hszTopic = DdeCreateStringHandle(idInst, L"control", CP_ACP);
- HCONV hConv = DdeConnect(idInst, hszService, hszTopic, NULL); // blocks for ~30sec when Hey Cortana is enabled
- if (hConv != NULL)
- DdeDisconnect(hConv);
- DdeFreeStringHandle(idInst, hszService);
- DdeFreeStringHandle(idInst, hszTopic);
- DdeUninitialize(idInst);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement