Consultor Eletrônico



Kbase P130450: 4GL/ABL: What is the data type of the variable needed to store the EPSON chCtrlFrame:OPOSPOSPrinter
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   11/04/2008
Status: Unverified

GOAL:

4GL/ABL: What is the data type of the variable needed to store the EPSON chCtrlFrame:OPOSPOSPrinter ActiveX object?

FACT(s) (Environment):

Windows
Progress 8.x
Progress 9.x
OpenEdge 10.x

FIX:

Use a variable of type COM-HANDLE to store the EPSON chCtrlFrame:OPOSPOSPrinter ActiveX object. For example the following code snippet defines the variable hObject as COM-HANDLE, assigns it the handle of the EPSON chCtrlFrame:OPOSPOSPrinter object, invokes the CHECKHEALTH() method of the object and messages the object name, the CHECKHEALTH() method returned result and the objects CheckHealthText property :
DEFINE VARIABLE hObjectHandle AS COM-HANDLE NO-UNDO.
DEFINE VARIABLE cObjectName AS CHARACTER NO-UNDO.
DEFINE VARIABLE iResultReturned AS INTEGER NO-UNDO.
DEFINE VARIABLE cCheckHealthText AS CHARACTER NO-UNDO.

ASSIGN
hObjectHandle = chCtrlFrame:OPOSPOSPrinter
cObjectName = hObjectHandle:NAME
iResultReturned = hObjectHandle:CHECKHEALTH(0)
cCheckHealthText = hObjectHandle:CheckHealthText NO-ERROR.
IF ERROR-STATUS:ERROR THEN
MESSAGE ERROR-STATUS:GET-MESSAGE(1)
VIEW-AS ALERT-BOX INFO BUTTONS OK.
ELSE
MESSAGE
cObjectName "~n"
iResultReturned "~n"
cCheckHealthText
VIEW-AS ALERT-BOX INFO BUTTONS OK.