b*****e 发帖数: 14299 | 1 一个GUI程序下面调用了
pdDoc=actxserver('AcroExch.PDDoc');
去处理PDF文件,在Matlab环境下使用一切正常。但是当我用deploytool 或者mcc去生
成stand-alone
程序时,编译通过,但是执行到这一句出错,似乎我少包括了一些东西。求万能的佛偷
鸡版各位大侠不吝帮
忙,500伪币求解。 |
d*h 发帖数: 2347 | 2 执行的环境里面没有注册Acrobat OLE Object.
【在 b*****e 的大作中提到】 : 一个GUI程序下面调用了 : pdDoc=actxserver('AcroExch.PDDoc'); : 去处理PDF文件,在Matlab环境下使用一切正常。但是当我用deploytool 或者mcc去生 : 成stand-alone : 程序时,编译通过,但是执行到这一句出错,似乎我少包括了一些东西。求万能的佛偷 : 鸡版各位大侠不吝帮 : 忙,500伪币求解。
|
b*****e 发帖数: 14299 | 3 一看就看出了门道,我就是不知道哪里注册?
【在 d*h 的大作中提到】 : 执行的环境里面没有注册Acrobat OLE Object.
|
d*h 发帖数: 2347 | 4 应该是你安装Acrobat的时候自动注册的。
【在 b*****e 的大作中提到】 : 一看就看出了门道,我就是不知道哪里注册?
|
b*****e 发帖数: 14299 | 5 我觉得应该已经注册了的,否则matlab环境下也没法执行。问题是,为啥一到编译成
stand alone程序时
就不行了呐?
【在 d*h 的大作中提到】 : 应该是你安装Acrobat的时候自动注册的。
|
d*h 发帖数: 2347 | 6 从没用过matlab, 所以再具体的我就不知道了。抱歉。
【在 b*****e 的大作中提到】 : 我觉得应该已经注册了的,否则matlab环境下也没法执行。问题是,为啥一到编译成 : stand alone程序时 : 就不行了呐?
|
A*********l 发帖数: 2005 | 7 Is it on Windows machine?
It is likely to be this command:
acrobat.exe /REGSERVER
(I don't know exactly what the exe name for acrobat is. Right click on the
acrobat icon and choose property (or properties) and you will find out
what
is the exe file that starts the matlab application. (I don't have access
to a windows machine now).
If it works, baozi please.
【在 b*****e 的大作中提到】 : 一看就看出了门道,我就是不知道哪里注册?
|
b*****e 发帖数: 14299 | 8 不行啊,程序本身在Matlab下面执行是没有问题的,说明matlab还是找到acrobat OLE
object的。而
且我在注册表中HKEY_CLASSES_ROOT下也找到了。只是说为啥编译成的可执行文件不行?
【在 A*********l 的大作中提到】 : Is it on Windows machine? : It is likely to be this command: : acrobat.exe /REGSERVER : (I don't know exactly what the exe name for acrobat is. Right click on the : acrobat icon and choose property (or properties) and you will find out : what : is the exe file that starts the matlab application. (I don't have access : to a windows machine now). : If it works, baozi please.
|
d*h 发帖数: 2347 | 9 你的matlab编译和执行 vs Compile以后执行 是在同一个机器上么?
OLE
行?
【在 b*****e 的大作中提到】 : 不行啊,程序本身在Matlab下面执行是没有问题的,说明matlab还是找到acrobat OLE : object的。而 : 且我在注册表中HKEY_CLASSES_ROOT下也找到了。只是说为啥编译成的可执行文件不行?
|
b*****e 发帖数: 14299 | 10 同一台机器。
该OLE object需要acrobat standard/pro version才有,acrobat reader还没有。
【在 d*h 的大作中提到】 : 你的matlab编译和执行 vs Compile以后执行 是在同一个机器上么? : : OLE : 行?
|
|
|
A*********l 发帖数: 2005 | 11 This is not something under "HKEY_CLASSES_ROOT", there should also be
something under "AppID"
http://msdn.microsoft.com/en-us/library/aa910612.aspx
Do not try to add this entry manually.
/regserver should do it for you.
OLE
行?
【在 b*****e 的大作中提到】 : 不行啊,程序本身在Matlab下面执行是没有问题的,说明matlab还是找到acrobat OLE : object的。而 : 且我在注册表中HKEY_CLASSES_ROOT下也找到了。只是说为啥编译成的可执行文件不行?
|
b*****e 发帖数: 14299 | 12 http://www.mathworks.com/help/techdoc/matlab_external/f64299.html#f101975
Verifying the Registration
Here are several ways to verify that a control or server is registered.
Open the Registry Editor by typing regedit at the DOS prompt. Search for
your
control or server object by selecting Find from the Edit menu. It will
likely
be in the following structure:
HKEY_CLASSES_ROOT/progid
【在 A*********l 的大作中提到】 : This is not something under "HKEY_CLASSES_ROOT", there should also be : something under "AppID" : http://msdn.microsoft.com/en-us/library/aa910612.aspx : Do not try to add this entry manually. : /regserver should do it for you. : : OLE : 行?
|
A*********l 发帖数: 2005 | 13 http://msdn.microsoft.com/en-us/library/aa911706.aspx
Check ProgID also.
【在 A*********l 的大作中提到】 : This is not something under "HKEY_CLASSES_ROOT", there should also be : something under "AppID" : http://msdn.microsoft.com/en-us/library/aa910612.aspx : Do not try to add this entry manually. : /regserver should do it for you. : : OLE : 行?
|
b*****e 发帖数: 14299 | 14 also found progID there, huh......
【在 A*********l 的大作中提到】 : http://msdn.microsoft.com/en-us/library/aa911706.aspx : Check ProgID also.
|
A*********l 发帖数: 2005 | 15 I don't have access to WIndows machine now, so I only remember "AppID"
and "ProgID".
Yes, they are both under HKEY_CLASS_ROOT.
There are several ways to continue investigation if you can't find the
answer from internet.
One way is to use "Process Monitor" http://technet.microsoft.com/en-
us/sysinternals/bb896645.aspx. Use it to monitor what registry value
that your compiled exe is trying to access and what error it reports.
Once you get the actual error, you can continue from there.
There are also some other ways to enable COM log/tracing, but I forgot
how to do it now.
http://www.mathworks.com/help/techdoc/matlab_external/f64299.html#f10197
5
registered.
for
【在 b*****e 的大作中提到】 : http://www.mathworks.com/help/techdoc/matlab_external/f64299.html#f101975 : Verifying the Registration : Here are several ways to verify that a control or server is registered. : Open the Registry Editor by typing regedit at the DOS prompt. Search for : your : control or server object by selecting Find from the Edit menu. It will : likely : be in the following structure: : HKEY_CLASSES_ROOT/progid
|
A*********l 发帖数: 2005 | 16 Another thing to check:
How is your generated exe executed? (i.e. what account it is run as)? If
it is some kind of background process, it can have trouble. All COM
servers will configure who can start them and who can makes call to them,
although some will use default settings.
【在 A*********l 的大作中提到】 : I don't have access to WIndows machine now, so I only remember "AppID" : and "ProgID". : Yes, they are both under HKEY_CLASS_ROOT. : There are several ways to continue investigation if you can't find the : answer from internet. : One way is to use "Process Monitor" http://technet.microsoft.com/en- : us/sysinternals/bb896645.aspx. Use it to monitor what registry value : that your compiled exe is trying to access and what error it reports. : Once you get the actual error, you can continue from there. : There are also some other ways to enable COM log/tracing, but I forgot
|