IPXV_Inst::Init Method

From PDF XChange PDF SDK
Jump to: navigation, search
m (Automatic page editing by robot)
 
(15 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
__NOTOC__
 
[[Category:Editor]]
 
[[Category:Editor]]
 
{{#customTitle:IPXV_Inst::Init Method}}
 
{{#customTitle:IPXV_Inst::Init Method}}
{{#parentPage:PXV:IPXV_Inst|Init Method|method}}
+
{{#parentPage:PXV:IPXV_Inst#Methods|Init|method}}
{{ToWrite}}
+
 
{{ToReview}}
 
{{ToReview}}
  
This method initializes the main object instance and must be called first, '''before''' of calling any other method.
+
This method initializes the main object instance and must be called first, '''before''' of calling any other method (excepting [[PXV:IPXV_Inst_SetStdFolder|IPXV_Inst::SetStdFolder]]/[[PXV:IPXV_Inst_GetStdFolder|IPXV_Inst::GetStdFolder]]/[[PXV:IPXV_Inst_CreateString|IPXV_Inst::CreateString]]).
  
 
== Syntax ==
 
== Syntax ==
<pre class="brush:cpp;gutter:false">HRESULT Init([in, optional] IUnknown* pCtx, [in, defaultvalue("")] BSTR pLicKey, [in, optional] IUnknown* pUserSettingsSrc, [in, optional] IUnknown* pHistorySrc, [in, optional] IUnknown* pHistoryThumbsSrc, [in, defaultvalue(0)] LONG nFlags, [in, optional] IUnknown* pReserved);</pre>
+
<pre class="brush:cpp;gutter:false">HRESULT Init([in, defaultvalue(NULL)] IUnknown* pCtx,
 +
            [in, defaultvalue("")]   BSTR       pLicKey,
 +
            [in, defaultvalue(NULL)] IUnknown* pUserSettingsSrc,
 +
            [in, defaultvalue(NULL)] IUnknown* pHistorySrc,
 +
            [in, defaultvalue(NULL)] IUnknown* pHistoryThumbsSrc,
 +
            [in, defaultvalue(0)]     LONG       nFlags,
 +
            [in, defaultvalue(NULL)] IUnknown* pReserved);</pre>
  
 
== Parameters ==
 
== Parameters ==
 
;pCtx
 
;pCtx
:[in, optional]  A pointer to '''IUnknown''' interface of context-object. This parameter is optional and can be NULL.
+
:[in, optional]  A pointer to '''IUnknown''' interface of context-object. This parameter is optional and can be NULL. Reserved for the future.
 +
;pLicKey
 +
:[in, optional]  A pointer to unicode string that contains developer's license key. This parameter is optional and can be empty - in this case the SDK will work in DEMO mode.  
 
;pUserSettingsSrc
 
;pUserSettingsSrc
:[in, optional]  A pointer to [[PXV:IAFS_Name|IAFS_Name]]/[[PXV:IAFS_File|IAFS_File]] object that specifies path to a source of all user's preferences. This parameter is optional and can be NULL.
+
:[in, optional]  A pointer to [[PXV:IAFS_Name|IAFS_Name]]/[[PXV:IAFS_File|IAFS_File]]/IStream object that specifies the source of all user's preferences. This parameter is optional and can be NULL. Also via [[PXV:IString|IString]] (see [[PXV:IPXV_Inst_CreateString|IPXV_Inst::CreateString]]) you may specify path to local file or path to custom location in system's registry in format for example:
;pRegistryPathToSettings
+
:<tt>HKEY_CURRENT_USER\Software\MyApp\PDFEditorSettings</tt>
:[in, optional] Path to custom location in system's registry that contains all user's preferences. This parameter is optional and can be NULL.
+
:<tt>HKEY_LOCAL_MACHINE\Software\MyApp\PDFEditorSettings</tt>
;pHistoryFileName
+
The list of supported registry-root names: <tt>HKEY_CLASSES_ROOT, HKCR, HKEY_CURRENT_USER, HKCU, HKEY_LOCAL_MACHINE, HKLM</tt>.
:[in, optional]  Pointer to [[PXV:IAFS_Name|IAFS_Name]] object that specifies the path to a source of documents opening history. This parameter is optional and can be NULL.
+
;pHistorySrc
;pRegistryPathToHistory
+
:[in, optional]  Pointer to [[PXV:IAFS_Name|IAFS_Name]]/[[PXV:IAFS_File|IAFS_File]]/IStream object that specifies the source of documents opening history. This parameter is optional and can be NULL. Also via [[PXV:IString|IString]] you may specify path to local file or path to custom location in system's registry (see description for <tt>pUserSettingsSrc</tt>).
:[in, optional] Path to a custom location in system's registry that contains documents opening history. This parameter is optional and can be NULL.
+
;pHistoryThumbsSrc
;pHistoryThumbsFileName
+
:[in, optional]  Pointer to [[PXV:IAFS_Name|IAFS_Name]]/[[PXV:IAFS_File|IAFS_File]]/[[PXV:IString|IString]]/IStream object that specifies the source of thumbnails-cache for documents opening history. This parameter is optional and can be NULL.
:[in, optional]  Pointer to [[PXV:IAFS_Name|IAFS_Name]] object that specifies the path to a source of documents opening history thumbnails cache. This parameter is optional and can be NULL.
+
 
;nFlags
 
;nFlags
:[in, optional]  The advanced flags. This parameter is optional and can be 0.
+
:[in, optional]  The reserved parameter. Pass 0 there.
 
;pReserved
 
;pReserved
 
:[in, optional]  The reserved parameter. Pass NULL there.
 
:[in, optional]  The reserved parameter. Pass NULL there.
Line 32: Line 39:
  
 
== See Also ==
 
== See Also ==
See also [[PXV:IPXV_Inst|IPXV_Inst]], [[PXV:IAFS_Name|IAFS_Name]], [[PXV:IAFS_File|IAFS_File]].
+
[[PXV:IPXV_Inst|IPXV_Inst]]

Latest revision as of 13:58, 31 July 2015


This method initializes the main object instance and must be called first, before of calling any other method (excepting IPXV_Inst::SetStdFolder/IPXV_Inst::GetStdFolder/IPXV_Inst::CreateString).

Syntax

HRESULT Init([in, defaultvalue(NULL)]  IUnknown*  pCtx,
             [in, defaultvalue("")]    BSTR       pLicKey,
             [in, defaultvalue(NULL)]  IUnknown*  pUserSettingsSrc,
             [in, defaultvalue(NULL)]  IUnknown*  pHistorySrc,
             [in, defaultvalue(NULL)]  IUnknown*  pHistoryThumbsSrc,
             [in, defaultvalue(0)]     LONG       nFlags,
             [in, defaultvalue(NULL)]  IUnknown*  pReserved);

Parameters

pCtx
[in, optional] A pointer to IUnknown interface of context-object. This parameter is optional and can be NULL. Reserved for the future.
pLicKey
[in, optional] A pointer to unicode string that contains developer's license key. This parameter is optional and can be empty - in this case the SDK will work in DEMO mode.
pUserSettingsSrc
[in, optional] A pointer to IAFS_Name/IAFS_File/IStream object that specifies the source of all user's preferences. This parameter is optional and can be NULL. Also via IString (see IPXV_Inst::CreateString) you may specify path to local file or path to custom location in system's registry in format for example:
HKEY_CURRENT_USER\Software\MyApp\PDFEditorSettings
HKEY_LOCAL_MACHINE\Software\MyApp\PDFEditorSettings

The list of supported registry-root names: HKEY_CLASSES_ROOT, HKCR, HKEY_CURRENT_USER, HKCU, HKEY_LOCAL_MACHINE, HKLM.

pHistorySrc
[in, optional] Pointer to IAFS_Name/IAFS_File/IStream object that specifies the source of documents opening history. This parameter is optional and can be NULL. Also via IString you may specify path to local file or path to custom location in system's registry (see description for pUserSettingsSrc).
pHistoryThumbsSrc
[in, optional] Pointer to IAFS_Name/IAFS_File/IString/IStream object that specifies the source of thumbnails-cache for documents opening history. This parameter is optional and can be NULL.
nFlags
[in, optional] The reserved parameter. Pass 0 there.
pReserved
[in, optional] The reserved parameter. Pass NULL there.

Return Value

Returns S_OK if operation was successful or error code in other cases.

See Also

IPXV_Inst