HResult - GetTextFromResult

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

tdonovan
User
Posts: 61
Joined: Tue Jun 12, 2007 9:21 pm

HResult - GetTextFromResult

Post by tdonovan »

I am getting a HRForException of -2147417856, but GetTextFromResult isn't returning anything.

I am calling RunJavaScript at the time I get the error.

Seems to be some type of memory corruption that happens as I can't see the pages on the screen after this error occurs. If I don't run the script the file displays correctly.
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19913
Joined: Mon Jan 12, 2009 8:07 am

Re: HResult - GetTextFromResult

Post by Stefan - PDF-XChange »

Hi T Donovan,

This error is from the OS and means "System call failed". Please check your JS and make sure it is correct and working.

Regards,
Stefan
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2448
Joined: Thu Jun 30, 2005 4:11 pm

Re: HResult - GetTextFromResult

Post by Vasyl - PDF-XChange »

Hi, tdonovan.

The possible reason is that our main COM-server has crashed after some usage action.. In this case the RPC-relation between your app and this COM-server has been broken and lost..
Can you reproduce the issue with our standalone, end-user's PDF-Viewer app? May be there is a document-specific issue.. Or may be there is script-specific issue that crashes our COM-server...

HTH
PDF-XChange Co. LTD (Project Developer)

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
tdonovan
User
Posts: 61
Joined: Tue Jun 12, 2007 9:21 pm

Re: HResult - GetTextFromResult

Post by tdonovan »

I have found if I split the Java into several sections that it will work, so your explanation I do think applies. It was performing a loop and if the loop was too big, failed but didn't give me any indication of the error. I rewrote the process so the Java script only preformed it's actions a limited number of times and just built a bigger loop in my program to call the java script multiple times.
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19913
Joined: Mon Jan 12, 2009 8:07 am

Re: HResult - GetTextFromResult

Post by Stefan - PDF-XChange »

Glad to hear a solution is found tdonovan!

Cheers,
Stefan