On 10/31/05, L505 <[EMAIL PROTECTED]> wrote:
> If you had a procedure or a function in a Pascal record, and it was a 
> DLL/DSO, could a C
> application import it as a Struct with a pointer to a function in that struct?

Yes, and the other way is also possible. This is done the other way
round when a pascal program calls RegisterClass from the Windows API.
It is sending a structure has a pointer to a function.

The only possible problem I see is if the structure contains numbers
that are smaller then a Integer (smallint, byte, word, etc) ... then
you may have some problems with the alignment of the data.

>From the Win API example I think that if you simple declare a normal
record on both and use it as a parameter it will work.

--
Felipe Monteiro de Carvalho
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to