I'm using Visual C++ 2005. I would like to use DDE to communicate with Adobe Acrobat, but I'm getting DDE connection failed.
Here's what I have so far:
HINSTANCE hRet; /*Start the DDE server*/ hRet = ShellExecute(0, "open", "test.pdf", 0, 0, SW_SHOWNORMAL); ASSERT((int)hRet >= 33); /*Connect to server*/ HSZ hszApp, hszTopic; char szApp = "acroview"; char szTopic = "control"; hszApp = DdeCreateStringHandle(dwIdInst, szApp, 0); hszTopic = DdeCreateStringHandle(dwIdInst, szTopic, 0); hConv = DdeConnect(dwIdInst, hszApp, hszTopic, NULL);
Adobe opens the pdf file fine, but when I call DdeConnect, it return NULL for hConv, telling "DDE Connection failed." Am I missing something?