User's Guide > Task Based Application Libraries > ProArgument and Argument Management
ProArgument and Argument Management
 
Use the data structure ProArgument to pass application data to and from tasks in other applications. The declaration for this structure is:
typedef struct pro_argument
{
ProName label;
ProValueData value;
} ProArgument;
The ProValueData structure supports the following argument types:
Integer
Double
String (char*)
String (wchar_t*)
Boolean
ProSelection
ProMatrix
Do not use the value type PRO_VALUE_TYPE_POINTER (provided with this structure in order to support feature element tree values) when passing arguments between applications.
Functions Introduced:
ProArgumentByLabelGet()
ProValuedataStringSet()
ProValuedataWstringSet()
ProValuedataTransformGet()
ProValuedataTransformSet()
ProArgumentProarrayFree()
Use the function ProArgumentByLabelGet() to locate an argument within a ProArray of ProArgument structures passed between applications.
Use the function ProValuedataStringSet() to allocate and copy memory into the ProValuedata structure for a char* argument. Using this function ensures that ProArgumentProarrayFree() releases all memory in an arguments array.
Use the function ProValuedataWstringSet() to allocate and copy memory into the ProValuedata structure for a wchar_t* argument. Use this function to ensure that ProArgumentProarrayFree() releases all memory in an arguments array.
Use the function ProValuedataTransformSet() to allocate and copy memory into the ProValuedata structure for a ProMatrix argument. Use this function to ensure that ProArgumentProarrayFree() releases all memory in an arguments array.
Use the function ProValuedataTransformGet() to copy a ProMatrix value into a local variable. The matrix data is not directly accessible from the double** member of the ProValuedata structure.
Use the function ProArgumentProarrayFree() to completely free an array of ProArgument structures.
這是否有幫助?