CA_ServerRelease
unsigned int CA_ServerRelease (IUnknown *thisInterfacePtr);
Purpose
Implementation of the IUnknown::Release method used in the ActiveX servers generated by the ActiveX Server Wizard. This function controls the lifetime of a COM object. CA_ServerRelease decrements the internal reference count of the object.
Use the CA_ServerRelease function to release interface pointers, as shown in the following sample code:
IFoo *pFoo = NULL;
FuncThatGetsFoo (&pFoo);
if (pFoo) {
DoWorkWithFoo (pFoo);
pFoo–>lpVtbl–>Release (pFoo);// release pFoo
pFoo = NULL;
}
Parameters
Input | ||
Name | Type | Description |
thisInterfacePtr | IUnknown * | The IUnknown interface pointer of your ActiveX object. |
Return Value
Name | Type | Description |
referenceCount | unsigned int | The value of the new reference count on the object. Use this information for diagnostic/testing purposes only, because in certain situations the value might be unstable. |
Additional Information
Library: ActiveX Library
Include file: cviauto.h
LabWindows/CVI compatibility: LabWindows/CVI 6.0 and later