|
CoRevokeClassObject
Informs OLE that a class object, previously registered with the CoRegisterClassObject function, is no longer available for use.
HRESULT CoRevokeClassObject(
DWORD dwRegister
| //Token on class object returned from call to CoRegisterClassObject
| );
|
|
Parameter
dwRegister
Specifies the token previously returned from the CoRegisterClassObject function.
Return Values
S_OK
Indicates the class object was successfully revoked.
E_OUTOFMEMORY
Out of memory.
E_INVALIDARG
Indicates the dwRegister parameter does not map to a registered class object.
E_UNEXPECTED
Indicates an unexpected error occurred.
Comments
If a call to CoRevokeClassObject is successful, it means that the class object has been removed from the
global class object table. However, if other clients still have pointers to the
class object and have caused the reference count to be incremented by calls to IUnknown::AddRef, the reference count will not be zero. When this occurs, applications may
benefit if subsequent calls (with the obvious exceptions of IUnknown::AddRef and IUnknown::Release) to the class object fail.
The object application must call CoRevokeClassObject to revoke registered class objects before exiting the program. Class object
implementors should call CoRevokeClassObject as part of the release sequence. You must specifically revoke the class
object even when you have specified the flags value REGCLS_SINGLEUSE in a call to CoRegisterClassObject, indicating that only one application can connect to the class object.
See Also
CoGetClassObject, CoRegisterClassObject
Related LinksSoftware for Delphi and C++ Builder developers Software for Visual Studio .NET developers Software for Visual Basic 6 developers Delphi Tips&Tricks
MegaDetailed.NET
TMS Scripter Studio Pro components for Delphi/C++Builder
More Online Helps Win32 Programmer's Reference (win32.hlp) Win32 Multimedia Programmer's Reference (mmedia.hlp) Microsoft Windows Pen API Programmer's Reference (penapi.hlp) Microsoft Windows Sockets 2 Reference (sock2.hlp) Microsoft Windows Telephony API (TAPI) Programmer's Reference (sock2.hlp) Unix Manual Pages
|