Quantcast
Channel: Visual COBOL - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 4356

RE: invoke error on oopsm.dll

$
0
0

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


Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>