Strange behavior

John C johnch_atms at hotmail.com
Tue Mar 25 08:21:38 PDT 2008


yvad Wrote:

> John C Wrote:
> 
> > yvad Wrote:
> > 
> > > QueryInterface of type HRESULTWindows (GUID * riidriid, out void* ppvObject ppvObject) overrides but is not covariant with QueryInterface of type HRESULT(GUID * riidriid, void* ppvObject ppvObject)
> > 
> > Further to my other reply ... The compiler is complaining because the function signatures don't match - one is lacking an "out" attribute. But the code you posted isn't missing the "out". Did you change the code before posting it here?
> 
> I attached original files
> 

Compiles OK for me.

Be aware that "delete this" in your ref counting code will not free any memory. You should override AbstractUnknown's new and use malloc, then release the memory with free. Nor will COM objects get garbage collected.


More information about the Digitalmars-d-learn mailing list