For some pointers on debugging OLE servers and general error handling, see:
MSKB Q157049 HOWTO Debug remote automation servers
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q157049 and
foxtalk article "Reporting Errors":
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfoxtk00/html/ft00h12.asp>Hi,
>
>I will sent my code for you to had a look, hopefully you can
>help to find the bugs. Thank in advance.
>
>>I would take a look at the class method code if it's available. Or, try calling the Open() method in the command window without setting a printer, to see if that causes a printer dialog to come up.
>>
>>When you are logging the error, also write the values of all relevant properties of the object, like cPrinterName. If it works as an EXE, I would suspect that something is generating a dialog of some sort. After setting Sys(2335,0) the error produced would be "user interface operation not allowed at this time".
>>