[fpc-pascal] Poss FPC Bug.

Flávio Etrusco flavio.etrusco at gmail.com
Tue Apr 6 01:56:24 CEST 2010


On Mon, Apr 5, 2010 at 8:29 PM, Justin Smyth
<delphian at 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



More information about the fpc-pascal mailing list