The LicenseShellExecuteFile method licences a document to be printed with ShellExecute
[ in ] BSTR p_pwstrFileName,
[in] pointer to a Unicode string containing the name of the file that will be licensed
S_OK on success or COM error code
This method must be called prior to calling the ShellExecute function for the given parameter. This call assures that the document will be printed without the notice on bottom of pages, even if the application that prints the document is already opened.