DLL, export bool dfunc(char[] s, extern (Windows) bool function() cb)

Jarrett Billingsley kb3ctd2 at yahoo.com
Wed Jan 16 05:45:54 PST 2008


"Bjoern" <nanali at nospam-wanadoo.fr> wrote in message 
news:fmja4s$11rq$1 at digitalmars.com...

> alias extern(Windows) void function(char[] token, bool eof) MyFuncType;
>
> extern(Windows) export bool dfunc(char[] s, MyFuncType cb)
> {
>   // do something and call cb, (exists in a secondary thread)
>  cb(token, false)
> }
> I hope this is correct ?

That looks perfectly fine.  Only thing I wonder is, does 4GL support D-style 
char[]?  Or will it be passing/expecting C-style zero-terminated char*? 





More information about the Digitalmars-d mailing list