On Mon, Apr 5, 2010 at 8:29 PM, Justin Smyth <delph...@smythconsulting.net> wrote: > guys i've been working on a port of an application that uses the Com > IPersist Interface , one of its procedures seems to be wrong , > > > Function GetClassId(clsid:TClsId):HResult; StdCall; > > yet i believe it should be > > Function GetClassId(out clsid:TClsId):HResult; StdCall > > i've checked the MSDN and it says it should be returning a value - > > its defined in C++ as > > HRESULT GetClassID([out] CLSID *pClassID); > > pClassID [out] > > A pointer to the location that receives the CLSID on return. The CLSID is a > globally unique identifier (GUID) that uniquely represents an object class > that defines the code that can manipulate the object's data. > > Delphian > > Ps if i change this in the code , its the FPC that needs to be re complied ? >
I've fallen victim of the same 'trap' on a similar function. Arrays are passed "by reference" automatically in 'stdcall' calling convention. Flávio _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal