PDF Toolbox
Loading...
Searching...
No Matches
Macros | Functions
PdfToolbox_Ptx.h File Reference
#include "PdfToolbox_Types.h"
#include "PdfToolbox_PtxSys.h"

Go to the source code of this file.

Macros

#define PDFTOOLBOX_CALL
 
#define Ptx_GetLastErrorMessage   Ptx_GetLastErrorMessageA
 
#define Ptx_Sdk_Initialize   Ptx_Sdk_InitializeA
 
#define Ptx_Sdk_GetVersion   Ptx_Sdk_GetVersionA
 
#define Ptx_Sdk_GetProducerFullName   Ptx_Sdk_GetProducerFullNameA
 
#define Ptx_StringMap_Get   Ptx_StringMap_GetA
 
#define Ptx_StringMap_GetKey   Ptx_StringMap_GetKeyA
 
#define Ptx_StringMap_GetValue   Ptx_StringMap_GetValueA
 
#define Ptx_StringMap_Set   Ptx_StringMap_SetA
 
#define Ptx_StringMap_SetValue   Ptx_StringMap_SetValueA
 

Functions

PDFTOOLBOX_EXPORT void PDFTOOLBOX_CALL Ptx_Initialize ()
 Initializes the library.
 
PDFTOOLBOX_EXPORT void PDFTOOLBOX_CALL Ptx_Uninitialize ()
 Uninitializes the library.
 
PDFTOOLBOX_EXPORT TPtx_ErrorCode PDFTOOLBOX_CALL Ptx_GetLastError ()
 Retrieves the last error code.
 
PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL Ptx_GetLastErrorMessageA (char *pBuffer, size_t nBufferSize)
 Retrieves the last error message.
 
PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL Ptx_GetLastErrorMessageW (WCHAR *pBuffer, size_t nBufferSize)
 Retrieve last error message.
 
PDFTOOLBOX_EXPORT void PDFTOOLBOX_CALL Ptx_SetLastErrorA (TPtx_ErrorCode iErrorCode, const char *szErrorMessage)
 Set last error code and error message.
 
PDFTOOLBOX_EXPORT void PDFTOOLBOX_CALL Ptx_SetLastErrorW (TPtx_ErrorCode iErrorCode, const WCHAR *szErrorMessage)
 Set last error code and error message.
 
PDFTOOLBOX_EXPORT void PDFTOOLBOX_CALL Ptx_Release (void *pObject)
 Release object.
 
PDFTOOLBOX_EXPORT void PDFTOOLBOX_CALL Ptx_AddRef (void *pObject)
 Increase reference count of object.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL Ptx_Equals (void *pObject, void *pOther)
 Compare two native objects.
 
PDFTOOLBOX_EXPORT int PDFTOOLBOX_CALL Ptx_GetHashCode (void *pObject)
 Get a hash code.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL Ptx_Sdk_InitializeA (const char *szLicense, const char *szProducerSuffix)
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL Ptx_Sdk_InitializeW (const WCHAR *szLicense, const WCHAR *szProducerSuffix)
 
PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL Ptx_Sdk_GetVersionA (char *pBuffer, size_t nBufferSize)
 
PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL Ptx_Sdk_GetVersionW (WCHAR *pBuffer, size_t nBufferSize)
 
PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL Ptx_Sdk_GetProducerFullNameA (char *pBuffer, size_t nBufferSize)
 
PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL Ptx_Sdk_GetProducerFullNameW (WCHAR *pBuffer, size_t nBufferSize)
 
PDFTOOLBOX_EXPORT int PDFTOOLBOX_CALL Ptx_StringMap_GetCount (TPtx_StringMap *pStringMap)
 The number of key-value pairs in the map.
 
PDFTOOLBOX_EXPORT int PDFTOOLBOX_CALL Ptx_StringMap_GetSize (TPtx_StringMap *pStringMap)
 The number of key-value pairs in the map.
 
PDFTOOLBOX_EXPORT int PDFTOOLBOX_CALL Ptx_StringMap_GetBegin (TPtx_StringMap *pStringMap)
 Get the position of the first entry in the map.
 
PDFTOOLBOX_EXPORT int PDFTOOLBOX_CALL Ptx_StringMap_GetEnd (TPtx_StringMap *pStringMap)
 Get the end position of the map.
 
PDFTOOLBOX_EXPORT int PDFTOOLBOX_CALL Ptx_StringMap_GetNext (TPtx_StringMap *pStringMap, int it)
 Get the position of the next entry in the map.
 
PDFTOOLBOX_EXPORT int PDFTOOLBOX_CALL Ptx_StringMap_GetA (TPtx_StringMap *pStringMap, const char *szKey)
 Get the position of a key in the map. If no error occurred, then the position can be used to get the corresponding value with Ptx_StringMap_GetValue.
 
PDFTOOLBOX_EXPORT int PDFTOOLBOX_CALL Ptx_StringMap_GetW (TPtx_StringMap *pStringMap, const WCHAR *szKey)
 Get the position of a key in the map. If no error occurred, then the position can be used to get the corresponding value with Ptx_StringMap_GetValue.
 
PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL Ptx_StringMap_GetKeyA (TPtx_StringMap *pStringMap, int it, char *pBuffer, size_t nBufferSize)
 Get the key of the entry given a position.
 
PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL Ptx_StringMap_GetKeyW (TPtx_StringMap *pStringMap, int it, WCHAR *pBuffer, size_t nBufferSize)
 Get the key of the entry given a position.
 
PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL Ptx_StringMap_GetValueA (TPtx_StringMap *pStringMap, int it, char *pBuffer, size_t nBufferSize)
 Get the value of the entry given a position.
 
PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL Ptx_StringMap_GetValueW (TPtx_StringMap *pStringMap, int it, WCHAR *pBuffer, size_t nBufferSize)
 Get the value of the entry given a position.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL Ptx_StringMap_SetA (TPtx_StringMap *pStringMap, const char *szKey, const char *szValue)
 Set the value of an entry for a given key. This operation invalidates all positions previously returned by‹pre›_‹map›_GetBegin, Ptx_StringMap_GetEnd, Ptx_StringMap_GetNext, and Ptx_StringMap_Get.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL Ptx_StringMap_SetW (TPtx_StringMap *pStringMap, const WCHAR *szKey, const WCHAR *szValue)
 Set the value of an entry for a given key. This operation invalidates all positions previously returned by‹pre›_‹map›_GetBegin, Ptx_StringMap_GetEnd, Ptx_StringMap_GetNext, and Ptx_StringMap_Get.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL Ptx_StringMap_SetValueA (TPtx_StringMap *pStringMap, int it, const char *szValue)
 Set the value of the entry at a position in the map.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL Ptx_StringMap_SetValueW (TPtx_StringMap *pStringMap, int it, const WCHAR *szValue)
 Set the value of the entry at a position in the map.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL Ptx_StringMap_Clear (TPtx_StringMap *pStringMap)
 Remove all entries from the map.
 
PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL Ptx_StringMap_Remove (TPtx_StringMap *pStringMap, int it)
 Remove the entry at a position in the map.
 

Macro Definition Documentation

◆ PDFTOOLBOX_CALL

#define PDFTOOLBOX_CALL

◆ Ptx_GetLastErrorMessage

#define Ptx_GetLastErrorMessage   Ptx_GetLastErrorMessageA

◆ Ptx_Sdk_GetProducerFullName

#define Ptx_Sdk_GetProducerFullName   Ptx_Sdk_GetProducerFullNameA

◆ Ptx_Sdk_GetVersion

#define Ptx_Sdk_GetVersion   Ptx_Sdk_GetVersionA

◆ Ptx_Sdk_Initialize

#define Ptx_Sdk_Initialize   Ptx_Sdk_InitializeA

◆ Ptx_StringMap_Get

#define Ptx_StringMap_Get   Ptx_StringMap_GetA

◆ Ptx_StringMap_GetKey

#define Ptx_StringMap_GetKey   Ptx_StringMap_GetKeyA

◆ Ptx_StringMap_GetValue

#define Ptx_StringMap_GetValue   Ptx_StringMap_GetValueA

◆ Ptx_StringMap_Set

#define Ptx_StringMap_Set   Ptx_StringMap_SetA

◆ Ptx_StringMap_SetValue

#define Ptx_StringMap_SetValue   Ptx_StringMap_SetValueA

Function Documentation

◆ Ptx_AddRef()

PDFTOOLBOX_EXPORT void PDFTOOLBOX_CALL Ptx_AddRef ( void * pObject)

Increase reference count of object.

Internally, the reference count is incremented by 1.

Parameters
[in,out]pObjectObject which reference count should be incremented by 1.

◆ Ptx_Equals()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL Ptx_Equals ( void * pObject,
void * pOther )

Compare two native objects.

Checks if two handles point to the same object.

Parameters
[in]pObjectPointer to one object.
[in]pOtherPointer to other object.
Returns
TRUE if both pointers point to the same object; FALSE otherwise.

◆ Ptx_GetHashCode()

PDFTOOLBOX_EXPORT int PDFTOOLBOX_CALL Ptx_GetHashCode ( void * pObject)

Get a hash code.

Get a hash code for a given native object.

Parameters
[in]pObjectPointer to the object for which a hash code is calculated.
Returns
The hash code of the object.

◆ Ptx_GetLastError()

Retrieves the last error code.

When a function returns a value indicating a potential error, determine the error by a specific error code. An error is confirmed if the error code differs from ePtx_Error_Success.

Returns
The error code that last was set.

◆ Ptx_GetLastErrorMessageA()

PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL Ptx_GetLastErrorMessageA ( char * pBuffer,
size_t nBufferSize )

Retrieves the last error message.

Gets a detailed error message.

Parameters
[out]pBufferThe function has to be called twice, the first time by setting pBuffer to NULL to obtain the actual buffer size and the second time with the allocated pBuffer and the buffer size obtained in the first call. The return value of this function specifies the buffer size.
[in]nBufferSizeThe number of characters to be copied to pBuffer.
Returns
The amount of data written to the buffer pBuffer. 0 if there is an error.

◆ Ptx_GetLastErrorMessageW()

PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL Ptx_GetLastErrorMessageW ( WCHAR * pBuffer,
size_t nBufferSize )

Retrieve last error message.

Gets a detailed error message.

Parameters
[out]pBufferThe function has to be called twice, the first time by setting pBuffer to NULL to obtain the actual buffer size and the second time with the allocated pBuffer and the buffer size obtained in the first call. The return value of this function specifies the buffer size.
[in]nBufferSizeThe buffer size of the retrieved string pBuffer.
Returns
The amount of data written to the buffer pBuffer. 0 if there is an error.

◆ Ptx_Initialize()

PDFTOOLBOX_EXPORT void PDFTOOLBOX_CALL Ptx_Initialize ( )

Initializes the library.

The function that must be called before any other API function. Failing to invoke this function results in undefined behavior.

◆ Ptx_Release()

PDFTOOLBOX_EXPORT void PDFTOOLBOX_CALL Ptx_Release ( void * pObject)

Release object.

Register errors by calling this function within a callback body. Disposable objects should be properly disposed by using their respective close functions.

Parameters
[in]pObjectObject to be released.

◆ Ptx_Sdk_GetProducerFullNameA()

PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL Ptx_Sdk_GetProducerFullNameA ( char * pBuffer,
size_t nBufferSize )
Parameters
[out]pBufferRetrieved value. To determine the required buffer size, the function has to be called with NULL. The return value of this function specifies the buffer size.
[in]nBufferSizeThe buffer size of the retrieved string pBuffer.
Returns
The amount of data written to the buffer pBuffer. 0 if there is an error.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage.

◆ Ptx_Sdk_GetProducerFullNameW()

PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL Ptx_Sdk_GetProducerFullNameW ( WCHAR * pBuffer,
size_t nBufferSize )
Parameters
[out]pBufferRetrieved value. To determine the required buffer size, the function has to be called with NULL. The return value of this function specifies the buffer size.
[in]nBufferSizeThe buffer size of the retrieved string pBuffer.
Returns
The amount of data written to the buffer pBuffer. 0 if there is an error.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage.

◆ Ptx_Sdk_GetVersionA()

PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL Ptx_Sdk_GetVersionA ( char * pBuffer,
size_t nBufferSize )
Parameters
[out]pBufferRetrieved value. To determine the required buffer size, the function has to be called with NULL. The return value of this function specifies the buffer size.
[in]nBufferSizeThe buffer size of the retrieved string pBuffer.
Returns
The amount of data written to the buffer pBuffer. 0 if there is an error.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage.

◆ Ptx_Sdk_GetVersionW()

PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL Ptx_Sdk_GetVersionW ( WCHAR * pBuffer,
size_t nBufferSize )
Parameters
[out]pBufferRetrieved value. To determine the required buffer size, the function has to be called with NULL. The return value of this function specifies the buffer size.
[in]nBufferSizeThe buffer size of the retrieved string pBuffer.
Returns
The amount of data written to the buffer pBuffer. 0 if there is an error.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage.

◆ Ptx_Sdk_InitializeA()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL Ptx_Sdk_InitializeA ( const char * szLicense,
const char * szProducerSuffix )
Parameters
[in]szLicense
[in]szProducerSuffix
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ Ptx_Sdk_InitializeW()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL Ptx_Sdk_InitializeW ( const WCHAR * szLicense,
const WCHAR * szProducerSuffix )
Parameters
[in]szLicense
[in]szProducerSuffix
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ Ptx_SetLastErrorA()

PDFTOOLBOX_EXPORT void PDFTOOLBOX_CALL Ptx_SetLastErrorA ( TPtx_ErrorCode iErrorCode,
const char * szErrorMessage )

Set last error code and error message.

Register errors by calling this function within a callback body.

Parameters
[in]iErrorCodeSet error code.
[in]szErrorMessageSet null-terminated error message.

◆ Ptx_SetLastErrorW()

PDFTOOLBOX_EXPORT void PDFTOOLBOX_CALL Ptx_SetLastErrorW ( TPtx_ErrorCode iErrorCode,
const WCHAR * szErrorMessage )

Set last error code and error message.

Register errors by calling this function within a callback body.

Parameters
[in]iErrorCodeSet error code.
[in]szErrorMessageSet null-terminated error message.

◆ Ptx_StringMap_Clear()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL Ptx_StringMap_Clear ( TPtx_StringMap * pStringMap)

Remove all entries from the map.

Parameters
[in,out]pStringMapActs as a handle to the native object of type TPtx_StringMap.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ Ptx_StringMap_GetA()

PDFTOOLBOX_EXPORT int PDFTOOLBOX_CALL Ptx_StringMap_GetA ( TPtx_StringMap * pStringMap,
const char * szKey )

Get the position of a key in the map. If no error occurred, then the position can be used to get the corresponding value with Ptx_StringMap_GetValue.

Parameters
[in,out]pStringMapActs as a handle to the native object of type TPtx_StringMap.
[in]szKey
Returns
May indicate an error in certain scenarios. For further information see the note section below.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ Ptx_StringMap_GetBegin()

PDFTOOLBOX_EXPORT int PDFTOOLBOX_CALL Ptx_StringMap_GetBegin ( TPtx_StringMap * pStringMap)

Get the position of the first entry in the map.

The order of the entries is arbitrary and not significant.

If the returned position differs from Ptx_StringMap_GetEnd,then the position can be used to retrieve the map entry with Ptx_StringMap_GetKey, Ptx_StringMap_GetValue.

Use Ptx_StringMap_GetNext to get the position of the next entry.

Parameters
[in,out]pStringMapActs as a handle to the native object of type TPtx_StringMap.
Returns
May indicate an error in certain scenarios. For further information see the note section below.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ Ptx_StringMap_GetCount()

PDFTOOLBOX_EXPORT int PDFTOOLBOX_CALL Ptx_StringMap_GetCount ( TPtx_StringMap * pStringMap)

The number of key-value pairs in the map.

Parameters
[in,out]pStringMapActs as a handle to the native object of type TPtx_StringMap.
Returns
May indicate an error in certain scenarios. For further information see the note section below.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ Ptx_StringMap_GetEnd()

PDFTOOLBOX_EXPORT int PDFTOOLBOX_CALL Ptx_StringMap_GetEnd ( TPtx_StringMap * pStringMap)

Get the end position of the map.

This position does not correspond to an actual entry in the map.

It must be used to determine whether the end of the map has been reached when using Ptx_StringMap_GetBegin and Ptx_StringMap_GetNext.

Parameters
[in,out]pStringMapActs as a handle to the native object of type TPtx_StringMap.
Returns
May indicate an error in certain scenarios. For further information see the note section below.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ Ptx_StringMap_GetKeyA()

PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL Ptx_StringMap_GetKeyA ( TPtx_StringMap * pStringMap,
int it,
char * pBuffer,
size_t nBufferSize )

Get the key of the entry given a position.

Parameters
[in,out]pStringMapActs as a handle to the native object of type TPtx_StringMap.
[in]it
[out]pBufferTo determine the required buffer size, the function has to be called with NULL. The return value of this function specifies the buffer size.
[in]nBufferSizeThe buffer size of the retrieved string pBuffer.
Returns
The amount of data written to the buffer pBuffer. 0 if there is an error.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ Ptx_StringMap_GetKeyW()

PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL Ptx_StringMap_GetKeyW ( TPtx_StringMap * pStringMap,
int it,
WCHAR * pBuffer,
size_t nBufferSize )

Get the key of the entry given a position.

Parameters
[in,out]pStringMapActs as a handle to the native object of type TPtx_StringMap.
[in]it
[out]pBufferTo determine the required buffer size, the function has to be called with NULL. The return value of this function specifies the buffer size.
[in]nBufferSizeThe buffer size of the retrieved string pBuffer.
Returns
The amount of data written to the buffer pBuffer. 0 if there is an error.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ Ptx_StringMap_GetNext()

PDFTOOLBOX_EXPORT int PDFTOOLBOX_CALL Ptx_StringMap_GetNext ( TPtx_StringMap * pStringMap,
int it )

Get the position of the next entry in the map.

The order of the entries is arbitrary and not significant.

If the returned position differs from Ptx_StringMap_GetEnd, then the position can be used to retrieve the map entry with Ptx_StringMap_GetKey and Ptx_StringMap_GetValue.

Parameters
[in,out]pStringMapActs as a handle to the native object of type TPtx_StringMap.
[in]it
Returns
May indicate an error in certain scenarios. For further information see the note section below.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ Ptx_StringMap_GetSize()

PDFTOOLBOX_EXPORT int PDFTOOLBOX_CALL Ptx_StringMap_GetSize ( TPtx_StringMap * pStringMap)

The number of key-value pairs in the map.

Parameters
[in,out]pStringMapActs as a handle to the native object of type TPtx_StringMap.
Returns
May indicate an error in certain scenarios. For further information see the note section below.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:
Deprecated
Deprecated in Version 1.1.0.

◆ Ptx_StringMap_GetValueA()

PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL Ptx_StringMap_GetValueA ( TPtx_StringMap * pStringMap,
int it,
char * pBuffer,
size_t nBufferSize )

Get the value of the entry given a position.

Parameters
[in,out]pStringMapActs as a handle to the native object of type TPtx_StringMap.
[in]it
[out]pBufferTo determine the required buffer size, the function has to be called with NULL. The return value of this function specifies the buffer size.
[in]nBufferSizeThe buffer size of the retrieved string pBuffer.
Returns
The amount of data written to the buffer pBuffer. 0 if there is an error.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ Ptx_StringMap_GetValueW()

PDFTOOLBOX_EXPORT size_t PDFTOOLBOX_CALL Ptx_StringMap_GetValueW ( TPtx_StringMap * pStringMap,
int it,
WCHAR * pBuffer,
size_t nBufferSize )

Get the value of the entry given a position.

Parameters
[in,out]pStringMapActs as a handle to the native object of type TPtx_StringMap.
[in]it
[out]pBufferTo determine the required buffer size, the function has to be called with NULL. The return value of this function specifies the buffer size.
[in]nBufferSizeThe buffer size of the retrieved string pBuffer.
Returns
The amount of data written to the buffer pBuffer. 0 if there is an error.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ Ptx_StringMap_GetW()

PDFTOOLBOX_EXPORT int PDFTOOLBOX_CALL Ptx_StringMap_GetW ( TPtx_StringMap * pStringMap,
const WCHAR * szKey )

Get the position of a key in the map. If no error occurred, then the position can be used to get the corresponding value with Ptx_StringMap_GetValue.

Parameters
[in,out]pStringMapActs as a handle to the native object of type TPtx_StringMap.
[in]szKey
Returns
May indicate an error in certain scenarios. For further information see the note section below.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ Ptx_StringMap_Remove()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL Ptx_StringMap_Remove ( TPtx_StringMap * pStringMap,
int it )

Remove the entry at a position in the map.

Parameters
[in,out]pStringMapActs as a handle to the native object of type TPtx_StringMap.
[in]it
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ Ptx_StringMap_SetA()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL Ptx_StringMap_SetA ( TPtx_StringMap * pStringMap,
const char * szKey,
const char * szValue )

Set the value of an entry for a given key. This operation invalidates all positions previously returned by‹pre›_‹map›_GetBegin, Ptx_StringMap_GetEnd, Ptx_StringMap_GetNext, and Ptx_StringMap_Get.

Parameters
[in,out]pStringMapActs as a handle to the native object of type TPtx_StringMap.
[in]szKey
[in]szValue
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ Ptx_StringMap_SetValueA()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL Ptx_StringMap_SetValueA ( TPtx_StringMap * pStringMap,
int it,
const char * szValue )

Set the value of the entry at a position in the map.

Parameters
[in,out]pStringMapActs as a handle to the native object of type TPtx_StringMap.
[in]it
[in]szValue
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ Ptx_StringMap_SetValueW()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL Ptx_StringMap_SetValueW ( TPtx_StringMap * pStringMap,
int it,
const WCHAR * szValue )

Set the value of the entry at a position in the map.

Parameters
[in,out]pStringMapActs as a handle to the native object of type TPtx_StringMap.
[in]it
[in]szValue
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ Ptx_StringMap_SetW()

PDFTOOLBOX_EXPORT BOOL PDFTOOLBOX_CALL Ptx_StringMap_SetW ( TPtx_StringMap * pStringMap,
const WCHAR * szKey,
const WCHAR * szValue )

Set the value of an entry for a given key. This operation invalidates all positions previously returned by‹pre›_‹map›_GetBegin, Ptx_StringMap_GetEnd, Ptx_StringMap_GetNext, and Ptx_StringMap_Get.

Parameters
[in,out]pStringMapActs as a handle to the native object of type TPtx_StringMap.
[in]szKey
[in]szValue
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ Ptx_Uninitialize()

PDFTOOLBOX_EXPORT void PDFTOOLBOX_CALL Ptx_Uninitialize ( )

Uninitializes the library.

The function that must be called after all the other API functions. Failing to invoke this function results in undefined behavior.