Platform SDK: MAPI |
The IMAPIViewContext::GetPrintSetup method retrieves current printing information.
See IMAPIViewContext : IUnknown.
HRESULT GetPrintSetup( ULONG ulFlags, LPFORMPRINTSETUP FAR * lppFormPrintSetup );
Form objects call the IMAPIViewContext::GetPrintSetup method to retrieve information about the printer setup before attempting to print the current message.
Allocate the hDevMode and hDevNames members of the FORMPRINTSETUP structure using the Win32 function GlobalAlloc.
If you expect the hDevMode and hDevName members of the FORMPRINTSETUP structure pointed to by the lppFormPrintSetup parameter to be Unicode strings, set ulFlags to MAPI_UNICODE. Otherwise, GetPrintSetup will return these strings in ANSI format.
Free the hDevMode and hDevName members of the FORMPRINTSETUP structure by calling the Win32 function GlobalFree. Free the entire FORMPRINTSETUP structure by calling MAPIFreeBuffer.