初始化adobereader自动化
c++ Initialize Adobe Reader automation
我有下面显示的代码打开adobe阅读器。我的灵感来自http://www.codeproject.com/Articles/8763/A-simple-wrapper-to-control-Acrobat-Reader-from-yo每次adobe阅读器没有打开,ddeconconnect返回null,所以我得到DDE连接失败。你知道如何帮我连接到adobereader吗?
我必须使用纯c++和win32 api。
iReturn = DdeInitialize(&this->dwIdInst, (PFNCALLBACK)DdeCallback,
APPCLASS_STANDARD | APPCMD_CLIENTONLY, 0 );
/*Start the DDE server*/
hRet = ShellExecute(0, "open", this->stPdfFileName.c_str(), 0, 0, SW_SHOWNORMAL);
/*Connect to server*/
HSZ hszApp, hszTopic;
char szApp[] = "acroviewR11"; // Also I tried acroviewA11
char szTopic[] = "control";
hszApp = DdeCreateStringHandle(this->dwIdInst, szApp, 0);
hszTopic = DdeCreateStringHandle(this->dwIdInst, szTopic, 0);
this->hConv = DdeConnect(this->dwIdInst, hszApp, hszTopic, NULL);
DdeFreeStringHandle(this->dwIdInst, hszApp);
DdeFreeStringHandle(this->dwIdInst, hszTopic);
if (this->hConv == NULL) {
printf("DDE Connection Failed.n");
Sleep(1500);
DdeUninitialize(this->dwIdInst);
}
我不想只打开文档。我想自动化一些东西,感谢adobereader自动化,如添加的链接上面显示。
我也试过这样的代码:
DdeInitialize(&id, &DDE_ProcessMessage, APPCMD_CLIENTONLY, 0);
hszServerName = DdeCreateStringHandle(id, "Acrobat Search", 0);
hszTopicName = DdeCreateStringHandle(id, "Acrobat Search", 0);
hConv = DdeConnect(id, hszServerName, hszTopicName, NULL);
用"AcroViewR11"代替"AcroViewR11"
相关文章:
- Qt QML桌面应用程序自动化测试
- 根据应用程序是否已自动化显示不同的 QML 文件
- COM 自动化结构与它们的包装器
- 将 OLE 自动化日期 (OADate) 双精度转换为结构 tm,而不使用 VariantTime到SystemTime
- 如何结束在 COM 自动化期间执行的进程
- 从Intellij Java自动化C 调试
- 来自C 的自动化Python模块的张量源
- UI自动化回调中com对象的所有权
- 全球扩展宏:是否可以自动化
- 我正在制作一个自动化器,并且我需要自定义它才能在将鼠标钥匙放下时单击
- 如何将现有的矢量化函数与Intel编译器自动化的现有标量函数相关
- 如何在不调用 "-m" 选项的情况下自动化 git 提交来处理内部引号?
- 如何更改数组的大小并用自动化元素填充它
- 如何自动化按钮 HTML
- 视觉C Outlook自动化
- 在Excel自动化中使用非本地化公式
- 接收信号时如何自动化GDB核心转储
- Clang或GCC能够自动化手动展开的循环
- 自动化C 标头/源分离的工具
- 初始化adobereader自动化