|
|
|
IUnknown Interface |
|
IID_IUnknown |
{00000000-0000-0000-C000-000000000046} |
|
The IUnknown interface lets clients get pointers to other interfaces on a given object through the QueryInterface method, and manage the existence of the object through the AddRef and Release methods. All other COM interfaces are inherited, directly or indirectly, from IUnknown. Therefore, the three methods in IUnknown are the first entries in the VTable for every interface.
|
|
Methods in VTable order |
|
|
IUnknown Methods |
Description |
|
QueryInterface |
Returns pointers to supported interfaces. |
|
AddRef |
Increments reference count. |
|
Release |
Decrements reference count. |
|
QueryInterface |
|
FUNCTION IUnknown_QueryInterface ( _ BYVAL pthis AS DWORD PTR _ , BYREF riid AS GUID _ , BYREF ppvObj AS DWORD _ ) AS LONG
END FUNCTION
|
|
Inline assembler version
FUNCTION
IUnknown_QueryInterface ( _
|
|
AddRef |
|
FUNCTION IUnknown_AddRef ( _ BYVAL pthis AS DWORD PTR _
)
AS DWORD
LOCAL DWRESULT
AS LONG END FUNCTION
|
|
Inline assembler version
FUNCTION IUnknown_AddRef ( _ BYVAL pthis AS DWORD PTR _
)
AS DWORD
! mov eax, pthis END FUNCTION
|
|
Release |
|
FUNCTION IUnknown_Release ( _ BYVAL pthis AS DWORD PTR _
)
AS DWORD
LOCAL DWRESULT
AS DWORD END FUNCTION
|
|
Inline assembler version
FUNCTION IUnknown_Release ( _ BYVAL pthis AS DWORD PTR _
)
AS DWORD
! mov eax, pthis END FUNCTION
|
Page last updated on Sunday, 30 April 2006 13:57:13 +0200