0

我正在使用 Visual C++ 2005。我想使用 DDE 与 Adob​​e Acrobat 进行通信,但 DDE 连接失败。

这是我到目前为止所拥有的:

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 可以很好地打开 pdf 文件,但是当我调用 DdeConnect 时,它为 hConv 返回 NULL,告诉“DDE 连接失败”。我错过了什么吗?

4

0 回答 0