GetPredefinedForm2

Top  Previous  Next

The GetPredefinedForm2 retrieves information about a predefined custom form, given the form name.

HRESULT AddPredefinedForm2(

[in]  BSTR    p_wsFormName,

[out] BSTR*   p_pwsFormDescription,

[out] FLOAT*  p_pfWidth,

[out] FLOAT*  p_pfHeight,

[out] BOOL*   p_pbVisible,

[in]  BSTR    p_wsProfileName,

[in]  BOOL    p_bPublicProfile

);

 

Parameters:

p_wsFormName

[in]pointer to a BSTR containing the name of the custom form to add

p_pwsDescription

[out]pointer to a pointer to a BSTR that will contain the form description. The caller is responsible of freeing the allocated memory with SysFreeString

p_pfWidth

[out]will contain the form width in millimeters

p_pfHeight

[out]will contain the form height in millimeters

p_pbVisible

[out] specifies whether this form is visible in the forms combo box in the printer preferences dialog

p_wsProfileName

[in] pointer to a BSTR containing the profile to modify. If this parameter is an empty string, the current active profile is used.

p_bPublicProfile

[in] Flag if the profile is a public or a private profile.

 

Return values:

S_OK on success or COM error code

NV_NOT_INITIALIZED - Initialize was not called

NV_UNKNOWN_FORM - a form with the specified name does not exist