invoke error on oopsm.dll

Hi,

I have program compiled in Enterprise developer for Eclipse 2.3 and run on COBOL Server Win 2012,

      $set ooctrl( p)                                                                                 
       identification division.                                                                       
....

       environment division.                                                                          
       class-control.                                                                                 
           GetConnection is class "$OLE$SecureConnectionCOM.ConnectionProvider".                      

in procedure division

           invoke GetConnection "Init" using SCM-USER, SCM-PWD, SCM-URL                               
           returning SCM-RET-CODE                                                                     

this instruction give error 114:

Execution error : file 'SELLASCM'
error code: 114, pc=0, call=1, seg=0
114     Attempt to access item beyond bounds of memory (Signal 11)

mfdebug.log in File attachment.:

Error occurred in : C:\Program Files (x86)\Micro Focus\COBOL Server\bin\oopsm.dll, loaded at 0x00C80000

can help me please?

thank

bye

  • Verified Answer

    Because you method name begins with the prefix Get the run-time is assuming that it is a property instead of a method.

    In order to get this to be treated as a property you have to do the following before the call:

    Forcing the COM Message Type

    You can override the run-time system default of assuming that all COM messages sent from COBOL beginning "set" or "get" are property set or get operations. You can also force a message which is not prefixed "set" or "get" to be a property set or get. To force the message type, send the message "setDispatchType" to class OLEsup (filename OLEsup):

    invoke OLEsup "setDispatchType" using by value lsType

    where:

    lsType  PIC X(4) COMP-5

    value 0 = next message forced to invoke a method

    value 1 = next message forced to invoke a property set

    value 2 = next message forced to invoke a property get

    The message type is only forced for the next COM message send, after which it reverts to the default behavior until you "setDispatchType" again. Class OLEsup encapsulates several useful functions for COM automation programming, and is fully documented in the COM Automation Class Library reference