PXC_Inst ActiveX Object
Line 6: | Line 6: | ||
== Overview == | == Overview == | ||
− | The main ActiveX Object of '''PDF-XChange Core API SDK''' that provides | + | The main ActiveX Object of the '''PDF-XChange Core API SDK''' that provides much of the general functionality available to work with a PDF file and offers access to additional extensions of the SDK. |
− | The '''GUID''' | + | The object '''GUID''' is: |
::<tt>'''{D37FFAC6-B7ED-441E-B933-19B4E57FCB60}'''</tt> | ::<tt>'''{D37FFAC6-B7ED-441E-B933-19B4E57FCB60}'''</tt> | ||
− | The '''interface''' of control is: | + | The '''interface''' of the control is: |
::[[PXV:IPXC_Inst|IPXC_Inst]] | ::[[PXV:IPXC_Inst|IPXC_Inst]] | ||
Line 18: | Line 18: | ||
== How to Instantiate == | == How to Instantiate == | ||
− | You | + | You usual way to instantiate the object is to use the '''CoCreateInstance''' function, however there maybe a more appropriate means instantiate an ActiveX-object in your preferred programming language and if so, this may be used. |
For example, in C#: | For example, in C#: | ||
Line 38: | Line 38: | ||
</pre> | </pre> | ||
− | + | There exists another special way to get a pointer to the [[PXV:IPXC_Inst|IPXC_Inst]] interface. For example, using C++: | |
<pre class="brush:cpp;gutter:false"> | <pre class="brush:cpp;gutter:false"> | ||
typedef HRESULT (__cdecl *t_pPXC_GetInstance)(IPXC_Inst** ppInst); | typedef HRESULT (__cdecl *t_pPXC_GetInstance)(IPXC_Inst** ppInst); | ||
Line 54: | Line 54: | ||
</pre> | </pre> | ||
− | - with this | + | - with this method you will be able to use the SDK ''without'' regular installation as COM-server on a client machine. |
− | '''NOTE:''' in context of '''PDF-XChange Editor SDK''' this object has different GUID: | + | '''NOTE:''' in the context of the '''PDF-XChange Editor SDK''' this object has a different GUID which is: |
::<tt>'''{77E64401-E3E8-4049-A630-0434E69586AA}'''</tt> | ::<tt>'''{77E64401-E3E8-4049-A630-0434E69586AA}'''</tt> | ||
− | and | + | and we provide two specific methods to access this library: |
− | * '''A.''' by using '''CoCreateInstance'''. For example, in C#: | + | * '''A.''' by using the '''CoCreateInstance'''. For example, in C#: |
<pre class="brush:cpp;gutter:false"> | <pre class="brush:cpp;gutter:false"> | ||
AxPDFXEdit.AxPXC_Inst pdfCoreInst = AxPDFXEdit.AxPXC_Inst(); | AxPDFXEdit.AxPXC_Inst pdfCoreInst = AxPDFXEdit.AxPXC_Inst(); | ||
</pre> | </pre> | ||
− | * '''B.''' by | + | Or |
+ | |||
+ | * '''B.''' by retrieving a pointer to the [[PXV:IPXC_Inst|IPXC_Inst]] interface as an extension. For example, in C++: | ||
<pre class="brush:cpp;gutter:false"> | <pre class="brush:cpp;gutter:false"> | ||
AxPDFXEdit.IPXV_Inst pdfInst; | AxPDFXEdit.IPXV_Inst pdfInst; | ||
Line 82: | Line 84: | ||
== How to Use == | == How to Use == | ||
− | If '''PDF-XChange Core API SDK''' is used, | + | If the '''PDF-XChange Core API SDK''' is used, this must be initialized by a call to the [[PXV:IPXC_Inst_Init|IPXC_Inst::Init]] method and should be finalized by a call to the [[PXV:IPXC_Inst_Finalize|IPXC_Inst::Finalize]] method. |
− | These methods will have no effect | + | These methods will have no effect within the '''PDF-XChange Editor SDK'''. |
Revision as of 11:33, 5 June 2015
Overview
The main ActiveX Object of the PDF-XChange Core API SDK that provides much of the general functionality available to work with a PDF file and offers access to additional extensions of the SDK.
The object GUID is:
- {D37FFAC6-B7ED-441E-B933-19B4E57FCB60}
The interface of the control is:
How to Instantiate
You usual way to instantiate the object is to use the CoCreateInstance function, however there maybe a more appropriate means instantiate an ActiveX-object in your preferred programming language and if so, this may be used.
For example, in C#:
AxPDFXCoreAPI.AxPXC_Inst pdfInst = new AxPDFXCoreAPI.AxPXC_Inst();
In VB6:
Dim pdfInst As PDFXCoreAPI.PXC_Inst ... Set pdfInst = New PDFXCoreAPI.PXC_Inst
In C++:
CComPtr<IPXC_Inst> spPDFInst; HRESULT hr = CoCreateInstance(__uuidof(PXC_Inst), nullptr, CLSCTX_INPROC_SERVER, __uuidof(IPXC_Inst), (void**)&spPDFInst);
There exists another special way to get a pointer to the IPXC_Inst interface. For example, using C++:
typedef HRESULT (__cdecl *t_pPXC_GetInstance)(IPXC_Inst** ppInst); #if defined _M_IX86 #define SDK_LIB_NAME L"PDFXCoreAPI.x86.DLL" #else #define SDK_LIB_NAME L"PDFXCoreAPI.x64.DLL" #endif CComPtr<IPXC_Inst> spPDFInst; HMODULE hSDKLib = LoadLibrary(SDK_LIB_NAME); t_pPXC_GetInstance pfn = (t_pPXC_GetInstance)GetProcAddress(hSDKLib, "PXC_GetInstance"); HRESULT hr = pfn(&spPDFInst);
- with this method you will be able to use the SDK without regular installation as COM-server on a client machine.
NOTE: in the context of the PDF-XChange Editor SDK this object has a different GUID which is:
- {77E64401-E3E8-4049-A630-0434E69586AA}
and we provide two specific methods to access this library:
- A. by using the CoCreateInstance. For example, in C#:
AxPDFXEdit.AxPXC_Inst pdfCoreInst = AxPDFXEdit.AxPXC_Inst();
Or
- B. by retrieving a pointer to the IPXC_Inst interface as an extension. For example, in C++:
AxPDFXEdit.IPXV_Inst pdfInst; ... AxPDFXEdit.IPXC_Inst pdfCoreInst = (AxPDFXEdit.IPXC_Inst)pdfInst.GetExtension("PXC");
The same in C++:
CComPtr<IPXV_Inst> spPDFInst; ... CComPtr<IUnknown> spUnk; spPDFInst->GetExtension(CComBSTR(L"PXC"), &spUnk); CComQPtr<IPXC_Inst> spPDFCoreInst = spUnk;
How to Use
If the PDF-XChange Core API SDK is used, this must be initialized by a call to the IPXC_Inst::Init method and should be finalized by a call to the IPXC_Inst::Finalize method. These methods will have no effect within the PDF-XChange Editor SDK.