IDirect3DQuery9 Interface

 

 

' ****************************************************************************************
' IDirect3DQuery9 interface
' $IID_IDirect3DQuery9 = GUID$("{d9771460-a695-4f26-bbd3-27b840b541cc}")
' ****************************************************************************************

' ****************************************************************************************
' Applications use the methods of the IDirect3DQuery9 interface to perform asynchronous
' queries on a driver.
' Interface Information
'    Stock Implementation   d3d9.dll
'    Custom Implementation  No
'    Inherits from  IUnknown
'    Header     d3d9.h
'    Import library     d3d9.lib
'    Minimum operating systems  Windows 98
' ****************************************************************************************

' ****************************************************************************************
'DECLARE_INTERFACE_(IDirect3DQuery9, IUnknown)
'{
'    /*** IUnknown methods ***/
'  0.  STDMETHOD(QueryInterface)(THIS_ REFIID riid, void** ppvObj) PURE;
'  1.  STDMETHOD_(ULONG,AddRef)(THIS) PURE;
'  2.  STDMETHOD_(ULONG,Release)(THIS) PURE;

'    /*** IDirect3DQuery9 methods ***/
'  3.  STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9** ppDevice) PURE;
'  4.  STDMETHOD_(D3DQUERYTYPE, GetType)(THIS) PURE;
'  5.  STDMETHOD_(DWORD, GetDataSize)(THIS) PURE;
'  6.  STDMETHOD(Issue)(THIS_ DWORD dwIssueFlags) PURE;
'  7.  STDMETHOD(GetData)(THIS_ void* pData,DWORD dwSize,DWORD dwGetDataFlags) PURE;
'};
' ****************************************************************************************

' ****************************************************************************************
' GetDevice method
' Gets the device.
' Note  Calling this method will increase the internal reference count on the
' IDirect3DDevice9 interface. Be sure to call IUnknown::Release when you are done using
' this IDirect3DDevice9 interface or you will have a memory leak.
' HRESULT GetDevice(
'   IDirect3DDevice9 ** pDevice
' );
' ****************************************************************************************
FUNCTION IDirect3DQuery9_GetDevice ALIAS "IDirect3DQuery9_GetDevice" ( _
    BYVAL pthis AS DWORD PTR, BYREF ppDevice AS DWORD) EXPORT AS LONG

    LOCAL HRESULT AS LONG
    IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
    CALL DWORD @@pthis[3] USING IDirect3DQuery9_GetDevice(pthis, ppDevice) TO HRESULT
    FUNCTION = HRESULT

END FUNCTION
' ****************************************************************************************

' ****************************************************************************************
' GetType method
' Gets the query type.
' D3DQUERYTYPE GetType();
' ****************************************************************************************
FUNCTION IDirect3DQuery9_GetType ALIAS "IDirect3DQuery9_GetType" (BYVAL pthis AS DWORD PTR) EXPORT AS LONG

    LOCAL LRESULT AS LONG
    IF pthis = %NULL THEN EXIT FUNCTION
    CALL DWORD @@pthis[4] USING IDirect3DQuery9_GetType(pthis) TO LRESULT
    FUNCTION = LRESULT

END FUNCTION
' ****************************************************************************************

' ****************************************************************************************
' GetDataSize method
' Gets the number of bytes in the query data.
' DWORD GetDataSize();
' ****************************************************************************************
FUNCTION IDirect3DQuery9_GetDataSize ALIAS "IDirect3DQuery9_GetDataSize" (BYVAL pthis AS DWORD PTR) EXPORT AS DWORD

    LOCAL DWRESULT AS DWORD
    IF pthis = %NULL THEN EXIT FUNCTION
    CALL DWORD @@pthis[5] USING IDirect3DQuery9_GetDataSize(pthis) TO DWRESULT
    FUNCTION = DWRESULT

END FUNCTION
' ****************************************************************************************

' ****************************************************************************************
' Issue method
' Issue a query.
' HRESULT Issue(
'   DWORD dwIssueFlags
' );
' ****************************************************************************************
FUNCTION IDirect3DQuery9_Issue ALIAS "IDirect3DQuery9_Issue" ( _
    BYVAL pthis AS DWORD PTR, BYVAL dwIssueFlags AS DWORD) EXPORT AS LONG

    LOCAL HRESULT AS LONG
    IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
    CALL DWORD @@pthis[6] USING IDirect3DQuery9_Issue(pthis, dwIssueFlags) TO HRESULT
    FUNCTION = HRESULT

END FUNCTION
' ****************************************************************************************

' ****************************************************************************************
' GetData method
' Polls a queried resource to get the query state or a query result.
' HRESULT GetData(
'   void* pData,
'   DWORD dwSize,
'   DWORD dwGetDataFlags
' );
' ****************************************************************************************
FUNCTION IDirect3DQuery9_GetData ALIAS "IDirect3DQuery9_GetData" ( _
    BYVAL pthis AS DWORD PTR, BYVAL pData AS DWORD, BYVAL dwSize AS DWORD, _
    BYVAL dwGetDataFlags AS DWORD) EXPORT AS LONG

    LOCAL HRESULT AS LONG
    IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
    CALL DWORD @@pthis[7] USING IDirect3DQuery9_GetData(pthis, pData, dwSize, dwGetDataFlags) TO HRESULT
    FUNCTION = HRESULT

END FUNCTION
' ****************************************************************************************
 

 

Page last updated on Tuesday, 14 March 2006 20:15:43 +0100