Activex With Out Parameters In C++ S’abonner

Legacy Poster


I encountered a problem when writing a library that uses BarTender as a tool for generating reports. A large part of the library has already been implemented in the final stage, however, there was a requirement to export an image file of the report. I can only use pure ActiveX Bartender API.
I have a problem with calling the BtApplication.BtFormat.ExportPrintPreviewRangeToImage:

ExportPrintPreviewRangeToImage (PageRange: BSTR; Directory: BSTR; FileNameTemplate: BSTR; FileType: BSTR; Colors: BtColors; dpi: INT; backgroundColor: INT; SaveOpts: BtSaveOptions; out IncludeMargins: Bool; out IncludeBorder: Bool; out Messages: ^ ^ Messages ): BtPrintResult;

I can not set the correct type for last parameter (Messages).

Please find attached the code with which I have a problem (precisely with a variable msgs).
I can properly open format, but calling "ExportPrintPreviewToImage" returns an error 0x080020005 (DISP_E_TYPEMISMATCH).

What must be the type of a variable msgs to get the example to work?

Any help would be really appreciated

Vous devez vous connecter pour laisser un commentaire.