Sys(3095), Sys(3096)
These functions, added in VFP 7, deal with IDispatch pointers for COM objects. SYS(3095) returns the pointer for a specified COM object, while SYS(3096) returns the object for a specified pointer.
Usage |
nPointer = SYS( 3095, oCOMObject [, cInterface ] ) oComObject = SYS( 3096, nPointer ) |
Parameter |
Value |
Meaning |
oCOMObject |
Object |
The COM object reference for which you want/have the IDispatch pointer. |
cInterface |
GUID |
The GUID for the interface you want to use. (We think. This is not documented in Help, but is shown in the Accessibility Browser application.) |
nPointer |
Numeric |
The IDispatch pointer. |
Example |
* Instantiate a COM object. oMyWord = CREATEOBJECT("Word.Application") * Get a pointer to the IDispatch interface. ptrIDispatch = SYS(3095, oMyWord) * Display the pointer's value: ? ptrIdispatch * Now that you've got the pointer, find the object. oObjectFromIDispatch = SYS(3096, ptrIDispatch) * Display the object's name; should say "Microsoft Word": ? oObjectFromIDispatch.Name |
See Also |