Last modified: July 23, 2011
Applies to: Outlook
Describes the print setup information for the form object.
The FORMPRINTSETUP structure is used to describe the print setup information for a form object. Implementations of IMAPIViewContext::GetPrintSetup fill in the FORMPRINTSETUP structure and return it in the contents of the lppFormPrintSetup output parameter of GetPrintSetup.
If the MAPI_UNICODE flag is passed in the ulFlags parameter of GetPrintSetup, the strings referenced by the hDevmode and hDevnames members should be in Unicode format. Otherwise, the strings should be in ANSI format.
Form viewers implementing IMAPIViewContext must allocate the FORMPRINTSETUP structure using the MAPI allocator function MAPIAllocateBuffer, but allocate the individual members, hDevMode and hDevNames, with the Windows function GlobalAlloc. The release of memory is handled similarly. The hDevMode and hDevNames members must be freed using the Windows function GlobalFree whereas the FORMPRINTSETUP structure must be freed with the MAPIFreeBuffer function.