This page is quite good at explaining it: http://en.wikipedia.org/wiki/Compone...hnical_details
You are right, that you get a pointer to a virtual function table. It's basically a large list of functions that come in the order they are defined in the type definition
To call AddRef on a COM interface in eax do something like this:
To call Begin_QueryInterface(SomeGuid) in AsyncIUnknown(inheriting directly from IUnknown, which has 3 functions):Code:push eax // Reference to self mov eax, [eax] // Get the function list call [eax+4] // Second function (AddRef)
GUIDs aren't really used with DirectX as far as I know, since you create all interfaces through the deviceCode:push SomeGuid // Reference to GUID push eax // Reference to self mov eax, [eax] // Get the function list call [eax+3*4] // First function in AsyncIUnknown (AddRef)
More reading: http://www.polberger.se/components/r...oundation.html
Bookmarks