发布于 2007-04-08 21:32:11
0楼
PDLRTGetPropEx
Declaration
BOOL PDLRTGetPropEx(
ADRMODE adrMode,
LPCSTR lpszPictureName,
LPCSTR lpszObjectName,
LPCSTR lpszPropName,
VARTYPE vt,
LPVOID pvProp,
PDLRT_CALLBACK pfn,
LPVOID pvUser,
DWORD dwFlags,
LPVOID pData,
PCMN_ERROR pError );
Des cription
Requesting a current property value. The source is defined by lpszPictureName, lpszObjectName, and lpszPropName.
If the data type requested does not match the data type of the property, the value is converted into the required format when transferred to the pvProp user buffer (if possible).
Parameters
adrMode
The adrMode parameter is used to specify the addressing mode of the picture you want to edit.
PDLRT_AM_DEFAULT
0
Picture and object to be addressed in default mode
PDLRT_AM_PICTABS
1
Picture has absolute address
PDLRT_AM_OBJABS
2
Object has absolute address
It is possible to OR the PDLRT_AM_PICTABS and the PDLRT_AM_OBJABS value.
lpszPictureName
Pointer to the configured name of the picture according to the addressing mode specified by adrMode, without name extension. Sensitive to upper and lower case letters.
lpszObjectName
Pointer to the configured name of the object according to the addressing mode specified by adrMode.
lpszPropName
Pointer to the name of the object property.
vt
Data type of the value passed with pvProp. Valid types are defined in the "oaidl.h" Include file belonging to the compiler.
PvProp
Pointer to a tag to which the property value is saved. The data type of the value is determined by vt.
vt
PvProp
VT_BSTR
BSTR*
VT_LPSTR
LPSTR*
VT_LPWSTR
LPWSTR*
VT_UI4
LONG*
VT_xxxx
pvProp must point to a buffer.
For types which have a buffer (e.g. BSTR), the buffer is allocated by the function and must be cleared afterwards by the calling application.
pfn
Pointer to your callback function. It is called in order to inform you as to whether the job has been executed successfully or not. If pfn = NULL is passed here, the call is made in synchronous mode, i.e. the calling application is set waiting until either the property value requested is available in the buffer or PDLRT signals an error.
pvUser
Pointer to application-specific data; the pointer is passed on to the callback function. The function does not evaluate this pointer, but makes it available again within the callback function.
dwFlags
The parameter is reserved for future use and requires the default 0.
pData
The parameter is reserved for future use and requires the default NULL.
pError
Pointer to the data of the extended error message within the CMN_ERROR structure. In the event of an error, the system writes error information to this structure.
Return Value
TRUE
Object properties have been determined
FALSE
Error
Comments
Allocated memory areas are cleared as follows: with VT_BSTR, use the Windows API SysFreeString(...) function, with VT_LPSTR, VT_LPWSTR, use the Windows API LocalFree(...) function. No VT_DISPATCH or other references may be used, only the normal types and a maximum of one VT_VARIANT for an array property in the case of a simple type.
Error Messages
PDLRT_NO_PIC
Picture has not been selected
PDLRT_BAD_OLE_CONVERSION
Error during conversion via OLE automation
PDLRT_NO_PROP
Property not found
Required Files
pdlrtapi.h
pdlrt_s.lib
pdlrtapi.dll
Related Functions
PDLRT_CALLBACK
Callback function of the runtime functions