2012-09-29 47 views
-1

使用OPOS當我使用TOPOSPOSPrinter.open使用OPOS「接口不支持」的錯誤消息出現在Delphi

我嘗試使用打印機IBM4610但是當我使用的驅動程序OPUS這個問題的結果。

代碼編譯。

CODE

function TCustomizedTenderPlugin.HandleEvent: WordBool; 
var 

    ret:Integer; 

    mic : Pointer; 

    {pruebas con opos} 
    PosPrinter: TOPOSPOSPrinter; 



begin 
    {CREDENCIALES DE LA IMPRESORA . MODIFICAR DEPENDIENDO DEL TIPO} 
    CargarIni(puerto);  

     try 
     {Conexion con impresora} 
     PosPrinter:= TOPOSPOSPrinter.Create(nil); 
     PosPrinter.Open('4610_IBM',ret); // AQUI DA ERROR 
     ShowMessage(VarToStr(ret)); 
     PosPrinter.Close(ret); 
     ShowMessage(VarToStr(ret)); 
     Except 
     // mensaje de error del 

     // me da Interface not supported 
     end; 


end; 

請我需要幫助。

感謝您的善意幫助:)

+0

你沒有提供任何有用的信息(即使在你編輯後)。你說'REC'是一個整數,但是你沒有給它分配任何東西,並且你提到'IBM_4610'是一個'WideString',但是顯示它是一個常量,編譯器可能會自動轉換爲合適的類型。 –

+0

Im很抱歉,我很難解釋這個函數,因爲它來自一個dll。我使用Opus Driver。 –

+0

對不起。我在發佈答案後改變了整個問題;我會刪除它,因爲你的原始問題提出了完全不同的問題。 –

回答

0

您確定安裝了32位驅動程序嗎?

如果你這樣做,從Ide重新導入Com接口。

您安裝的驅動程序與您的tlb.pas生成的包裝不匹配。

+0

也許這就是問題...謝謝阿諾 –