In the below code I need to reference the guid IID_ID2D1Factory. I'm using the coinvoke macro method. The second argument wants a REFIID type? I don't have a clue how to do that. Any help? Thx.
invoke D2D1CreateFactory,D2D1_DEBUG_LEVEL_NONE,REFIID(?),D2D1_FACTORY_TYPE_SINGLE_THREADED,addr g_pD2D1Factory
;//+-----------------------------------------------------------------------------
;//
;// Interface:
;// ID2D1Factory
;//
;// Synopsis:
;// The root factory interface for all of D2D's objects.
;//
;//------------------------------------------------------------------------------
;06152247-6f50-465a-9245-118bfd3b6007"); Interface IID's
IID_ID2D1Factory textequ <{006152247h,06f50h,0465ah,{092h,045h,011h,08bh,0fdh,03bh,060h,007h}}>
_vtID2D1Factory MACRO CastName:REQ
_vtIUnknown CastName
&CastName&_ReloadSystemMetrics comethod1 ?
&CastName&_GetDesktopDpi comethod3 ?
&CastName&_CreateRectangleGeometry comethod3 ?
&CastName&_CreateRoundedRectangleGeometry comethod3 ?
&CastName&_CreateEllipseGeometry comethod3 ?
&CastName&_CreateGeometryGroup comethod6 ?
&CastName&_CreateTransformedGeometry comethod4 ?
&CastName&_CreatePathGeometry comethod2 ?
&CastName&_CreateStrokeStyle comethod6 ?
&CastName&_CreateDrawingStateBlock comethod4 ?
&CastName&_CreateWicBitmapRenderTarget comethod4 ?
&CastName&_CreateHwndRenderTarget comethod4 ?
&CastName&_CreateDxgiSurfaceRenderTarget comethod4 ?
&CastName&_CreateDCRenderTarget comethod3 ?
ENDM
ID2D1Factory struct
_vtID2D1Factory ID2D1Factory
ID2D1Factory ends
LPD2D1FACTORY typedef PTR ID2D1Factory
PD2D1FACTORY typedef PTR ID2D1Factory
Try this macro:
GUID_ADDR MACRO guid_text:REQ
LOCAL guid_data
.data
guid_data GUID guid_text
.code
EXITM <addr (guid_data)>
ENDM
IID_ID2D1Factory textequ <{006152247h,06f50h,0465ah,{092h,045h,011h,08bh,0fdh,03bh,060h,007h}}>
invoke D2D1CreateFactory,D2D1_DEBUG_LEVEL_NONE,GUID_ADDR(IID_ID2D1Factory),D2D1_FACTORY_TYPE_SINGLE_THREADED,addr g_pD2D1Factory
Once again thx Siekmanski for your dirctx expertize! Meow!