Hi Everyone,
Am I correct in assuming that a reference to an Interface can be a data member of TYPE definition? I don't think so.
Something like:
TYPE MyType
iMyClass As MyInterface
END TYPE
MyInterface would be defined in an earlier Class definition.
If it is not supported then would a good alternative be to define it as a DWord (iMyClass As DWord) and then somehow (Poke?) do the assignment to a locally declared variable for the MyInterface and handle the .AddRef stuff?
It is not currently supported.
Using a DWORD is the only possible workaround, but you have to manage the reference count by yourself, calling IUnknown::AddRef to make sure that the reference will be valid, converting it to an object variable to be able to use it and calling IUnknown::Release before the variable DIMed as your structure goes out of scope.
That's what I figured. Thanks.
I thought that we had discussed this before but I couldn't find it in my notes or the forum so I thought that I'd better ask just to be safe.