OLEIUNKNOWNRELEASE Method (System)
Description
Calls the Release() method for an OLE object when passed its interface pointer.
Syntax
IsReleased = Exec_Method( "SYSTEM", "OLEIUNKNOWNRELEASE", pObject )
Parameters
Name | Required | Description |
---|---|---|
pObject | Yes | IUnknown Interface pointer for the object. |
Returns
TRUE$ if the object is released, or FALSE$ otherwise.
Remarks
This method uses the OLE Release method on the IUnknown interface. For further information please see the IUnknown topic on the MSDN website.
You must ensure that the pointer passed to this method is valid, otherwise a GPF may occur.
Example
//// Extract the width and height of an OLE Picture, given it's // //// interface pointer// PicFile = "C:\temp\myPic.bmp" pPicture = Exec_Method( "SYSTEM", "OLELOADPICTURE", PicFile ) If pPicture Then PicProps = Exec_Method( "SYSTEM", "OLEGETPICTUREPROPS", pPicture ) If BLen( PicProps ) Then PicW = PicProps<4> PicH = PicProps<5> End //// Release the picture// Exec_Method( "SYSTEM", "OLEIKNOWNRELEASE", pPicture ) End
See Also
SYSTEM OLELOADPICTURE method.