Take the directx 9 CreateIndexBuffer function,these are the args:
HRESULT CreateIndexBuffer( [in] UINT Length, [in] DWORD Usage, [in] D3DFORMAT Format, [in] D3DPOOL Pool, [out, retval] IDirect3DIndexBuffer9 **ppIndexBuffer, [in] HANDLE *pSharedHandle );
What I did,was: I created a pointer to pointer:
And used it in the function call.But I get an exception,if I change it,so I create only a pointer(not a pointer to pointer) variable:
and pass it as an argument in the form &pp,it works.