[WinAPI] Problem with an interface...

Sascha Katzner sorry.no at spam.invalid
Thu Nov 22 12:48:06 PST 2007


Since it seems that a D interface is not usable in this case, I've 
solved this problem like Frits suggested with a struct as vtbl:

> struct ID3D10EffectTechniqueVtbl {
> 	extern(Windows) :
> 	BOOL function() IsValid;
> 	HRESULT function(D3D10_TECHNIQUE_DESC* pDesc) GetDesc;
> 	ID3D10EffectVariable function(UINT Index) GetAnnotationByIndex;
> 	ID3D10EffectVariable function(LPCSTR Name) GetAnnotationByName;
> 	ID3D10EffectPass function(UINT Index) GetPassByIndex;
> 	ID3D10EffectPass function(LPCSTR Name) GetPassByName;
> 	HRESULT function(D3D10_STATE_BLOCK_MASK* pStateBlockMask) ComputeStateBlockMask;
> }
> alias ID3D10EffectTechniqueVtbl* ID3D10EffectTechnique;

It is a little bit inconvenient, because now I have two different kinds 
of "interfaces", but it works. ;-)

Thanks @ all,
Sascha Katzner



More information about the Digitalmars-d mailing list