News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Indicating Size of Array

Started by Zen, November 02, 2014, 07:46:50 AM

Previous topic - Next topic

Zen

I'm converting DirectX 11 COM interfaces to MASM compatible structures, and, I'm stumped by what syntax the following ID3D11DeviceContext interface method should be:

;        C-style vtbl definition from Windows Seven SDK   
;         void ( STDMETHODCALLTYPE *OMSetBlendState )(
;             ID3D11DeviceContext * This,
;             /* [annotation] */
;             __in_opt  ID3D11BlendState *pBlendState,
;             /* [annotation] */
;             __in_opt  const FLOAT BlendFactor[ 4 ],   
;             /* [annotation] */
;             __in  UINT SampleMask);


Here is MSDN DirectX 11 documentation: ID3D11DeviceContext::OMSetBlendState method, MSDN

Here's what I have:

      METHOD(OMSetBlendState, _this:PVOID, pBlendState:DWORD, BlendFactor:REAL4, SampleMask:UINT)


The mystery is the third parameter: BlendFactor, which is optional, and an [in] parameter, defined as a array of 4 FLOATS.
What I'd like to indicate, is the size of the array. Would it be, BlendFactor:REAL4[4] ??? (This can't be right,...)
...Or,...would it be: BlendFactor:REAL4[] ??? (This doesn't seem right, either,...)

habran

Cod-Father

qWord

Arrays are passed as pointer =>
.., BlendFactor: ptr REAL4,...
MREAL macros - when you need floating point arithmetic while assembling!

Zen

QWORD,
Thanks. That's something that I should have known,...but, I thought I'd ask anyway,...