OLE Event handler parameters passed by reference as OSUint8

Technote (FAQ)


Question

How are OLE event handler parameters extracted from OSUint8's?

Answer

Some event handlers receive parameters that are instances of OSUint8. How can these parameters be manipulated?


OSUint8 instances are used to handle parameters that are passed by reference. The selectors in OSPtr can be used to extract the address or data pointed to by the passed pointer.

For example, to extract the 32-bit integer referenced by an OSUInt8 instance:

osUInt8Value := (theIntParm int32At: 0).

To change the integer stored in an OSUint8 instance:

theIntParm int32At: 0 put: 12.

" To dereference a pointer to a pointer to an automation object, use code like that below "

automationObject :=

OleAutomationObject forDispatch: (OSIDispatch address: (data uint32At: 0)).

Rate this page:

(0 users)Average rating

Add comments

Document information


More support for:

VisualAge Smalltalk
OLE

Software version:

all

Operating system(s):

Windows 2000, Windows 98, Windows NT

Reference #:

1000965

Modified date:

2007-12-21

Translate my page

Machine Translation

Content navigation