Skip to main content
Known Participant
June 27, 2016
Answered

Problem loading Acrobat SDK Sample

  • June 27, 2016
  • 5 replies
  • 1815 views

I am working with the BasicPlugin sample. I complied it in visual studio to a .dll file which I then changed the extension to a .api and added to the plu_ins folder. However, when I open acrobat xi pro BasicPlugIn does not appear as a Third party Plug-in and it does not appear in the Adobe Plug-Ins.  Where should the modified Acrobat SDK plug-ins show up?  In other words, how do I access my modified BasicPlugIn?

This topic has been closed for replies.
Correct answer lrosenth

Yeah – you should use the project provided as it handles all that stuff as well as getting you a properly build .api out.

5 replies

LWShayAuthor
Known Participant
June 28, 2016

Thanks I tested it out it's working fine now. No errors.

Karl Heinz  Kremer
Community Expert
Community Expert
June 28, 2016

I want to second TSN's advice to not even try to come up with your own project from scratch. When I first got into plug-in programming (back in the days of Acrobat 4), I painstakingly reverse engineered the project setup and created my own wizard to spit out Acrobat plug-in skeletons for a large project that required a large number of plug-ins. I've since abandoned that approach and now just use the starter plug-in and change the few things that make a plug-in unique. Much easier and faster and most importantly, less likely to mess things up. This approach requires that you edit project files, but you are only searching and replacing the plug-in name or file names, and the rest can stay as it is.

LWShayAuthor
Known Participant
June 27, 2016

I created a new project in visual studio and then I attached the existing BasicPlugin.cpp and BasicPluginInit.cpp

lrosenth
Adobe Employee
lrosenthCorrect answer
Adobe Employee
June 27, 2016

Yeah – you should use the project provided as it handles all that stuff as well as getting you a properly build .api out.

LWShayAuthor
Known Participant
June 27, 2016

I'm using visual studio 2012. I didn't see and option to compile to a .api file.

lrosenth
Adobe Employee
Adobe Employee
June 27, 2016

Did you simply load and build the existing project file from the SDK?

LWShayAuthor
Known Participant
June 27, 2016

When I initially tried to compile I receive the following errors

1>..\..\..\..\..\Desktop\BasicPlugin\sources\BasicPlugin.cpp(77): error C3861: 'sprintf': identifier not found

1>..\..\..\..\..\Desktop\BasicPlugin\sources\BasicPlugin.cpp(84): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.

1>          C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h(115) : see declaration of 'strcat'

1>..\..\..\..\..\Desktop\BasicPlugin\sources\BasicPlugin.cpp(90): error C3861: 'sprintf': identifier not found

1>CL : warning : Using older Acrobat SDK.  Define ACRO_SDK_LEVEL to 0x00090000

1>BasicPlugin.obj : error LNK2001: unresolved external symbol _gPDModelHFT

1>BasicPlugin.obj : error LNK2001: unresolved external symbol _gAcroViewHFT

1>BasicPlugin.obj : error LNK2001: unresolved external symbol _gExtensionID

1>BasicPlugin.obj : error LNK2001: unresolved external symbol _gCoreHFT

1>BasicPluginInit.obj : error LNK2001: unresolved external symbol _RestorePlugInFrame

I added the the following lines to fix these errors:

#define _CRT_SECURE_NO_WARNINGS

#include <stdio.h>

HFT gCoreHFT;

ExtensionID gExtensionID;

HFT gAcroViewHFT;

HFT gPDModelHFT;

ACCB1 void ACCB2 RestorePlugInFrame(void* environ)

{

}

Along with these header file:

#include "CorCalls.h"

#include "PIMain.h"

#include "PICommon.h"

#include "AVCalls.h"

#include "PDCalls.h"

#include "PIMain.h"

LWShayAuthor
Known Participant
June 27, 2016

I'm using visual studio 2012. I didn't see and option to build and .api

lrosenth
Adobe Employee
Adobe Employee
June 27, 2016

It should have built a .api, if it build a DLL, then I suspect something didn’t work as expected.

What version of Visual Stuidio are you using? With what version of the SDK?