Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


Problem loading plugin developed with Actobat SDK.

New Here ,
Jun 16, 2021 Jun 16, 2021

Copy link to clipboard

Copied

We have a plugin developed with the C/C++ SDK for Acrobat.

The plugin was developed some years back, but seems to have started from the BasicPlugin sample (the files are still called BasicPluginInit.cpp and BasicPlugin.cpp).

 

The plugin is placed in the correct folder (we are running on Windows), and also "Reader enabled" as part of the build.

 

However, Acrobat Reader DC does not load the plugin at startup (no breakpoints/logmessages are hit in any of the handshake functions).

 

We have narrowed the problem down to the following line:

 

client = new SimpleWeb::SocketClient<SimpleWeb::WS>("127.0.0.1:8080");

 

SimpleWeb is a library that seems to be used to open a websocket connection to our external app.

 

If I comment out that line (and the code that uses the client), the plugin loads just fine, and breakpoints/log messages in handshake methods are hit.

 

What could be the cause of the plugin not loading at all when SimleWeb is used?

 

Ps. I can instantiate other things from SimpleWeb, and the plugin loads fine. But not SocketClient.

 

I don't really know where to go from here:

 

- Is it some kind of security-check that Acrobat Reader does on the DLL (.api)?

- Is there some location where Acrobat will spit out error-messages, so I can see what it's unhappy about?

- Almost the same code has been used for year in our older products, so has something changed in Acrobat Reader recently?

- Are there other ways of doing the websocket communication that would allow the plugin to load?

 

Best regards.

Kenneth Johnsen.

TOPICS
Acrobat SDK and JavaScript, Windows

Views

63

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Jun 16, 2021 Jun 16, 2021
Acrobat certainly doesn't look at your code to reject particular things. Seems most likely that there is a DLL dependency. Acrobat would fail to load the file, and silently ignore it. Try using Microsoft tool Depends.exe to track this. Also try with Protected Mode both off and on. If you do this in plug-in initialisation then don't!

Likes

Translate

Translate
LEGEND ,
Jun 16, 2021 Jun 16, 2021

Copy link to clipboard

Copied

Acrobat certainly doesn't look at your code to reject particular things. Seems most likely that there is a DLL dependency. Acrobat would fail to load the file, and silently ignore it. Try using Microsoft tool Depends.exe to track this.

 

Also try with Protected Mode both off and on.

 

If you do this in plug-in initialisation then don't!

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 17, 2021 Jun 17, 2021

Copy link to clipboard

Copied

LATEST

Thank you very much!

The problem was exactly as you described.

Depends.exe showed that a libcrypto DLL could not be found.

After copying that file to the plug_ins folder, everything worked again 🙂

 

Best regards.

Kenneth Johnse.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 16, 2021 Jun 16, 2021

Copy link to clipboard

Copied

Also: run Acrobat (not Reader), with protected mode OFF, from the Visual Studio debugger. You can set a breakpoint on PluginMain to see if it loads. 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines