为Acrobat对话返回值设置outASPathNames [英] Setting outASPathNames for Acrobat Dialogue return value

查看:116
本文介绍了为Acrobat对话返回值设置outASPathNames的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为Adobe Acrobat编写一个插件,遇到一些问题,我正在设置AVAppOpenDialog变量的对话实现

I am writing a plug-in for Adobe Acrobat and having some issues I am setting my dialogues implementation of AVAppOpenDialog variable

*outASPathNames

底部代码中的

.它在方法中表示此变量是一个

in the code at the bottom. It says in the method that this variable is a

ASPathName**

这是我的设置方法.即使该文件名为 file.jpg ,它有时也会显示不同的名称,例如 A9R5D8F.tmp 或只是不起作用.我怀疑我没有正确设置变量,但是当您不知道什么地方出问题时,黑匣子测试非常困难.谁能从下面的代码中看到我可能做错了什么

Here is how I am setting it. Even though the file is called file.jpg it sometimes shows different names like A9R5D8F.tmp or just not work. I suspect I am not setting the variable correctly, but black box testing is very hard when you don't get told what is wrong. Can anyone see from the code below what I might be doing wrong

ASPathName asPathName;
char *filePath = "C:\\Test\\file1.jpg";
ASFile asFile;
ASPathName* arrays[] = {&asPathName};


asPathName = ASFileSysCreatePathFromDIPath(0, filePath, 0);
ASFileSysOpenFile64(0, asPathName, ASFILE_READ, (ASFile *)&asFile);


*outASPathNames = &asPathName;

推荐答案

`*outASPathNames`

根据Acrobat API,

是路径名数组.因此,对于初学者来说,您需要使用数组而不是ASPathName的地址.

according to the Acrobat API is an array of pathnames. So for starters you need to use an array not an address of an ASPathName.

第二,您需要确保分配此数组内存,否则将引发异常.数组的大小为1.

Secondly, you need to make sure you allocate this array memory or you will get thrown exceptions. 1 here is the size of the array.

*outASPathNames = (ASPathName*)ASmalloc(sizeof(ASPathName) * 1);

然后您可以填充

**outASPathNames = asPathName

这篇关于为Acrobat对话返回值设置outASPathNames的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆