On 17/01/2022 15:36, Jiří Činčura wrote: >> The "C library" is just another way to call things. >> >> It's binary compatible with the C++ interface. In fact the C++ interface >> is a wrapper around C objects to be multi compiler compatible. > > Sure, I'm not saying it isn't. > > It's just way way harder to do this type of interop from C# compared to > simply calling exported function from fbclient. Something like 11 out of 10 > people will tell you to get/create a wrapper. Which is fine if you own the > code. Not the case here. > >> I don't know how you call fbclient in the .NET code. >> >> But I remember C# can map C DLL with attributes. >> >> So I believe it's possible to map the current fbclient functions >> directly in C# code. > > That expects exports with `extern "C"`. >
There is fb_get_master_interface. It's an "extern C" function. And it's the only exported function of the new API. Everything else is in function pointers of structs similar to vtable of C++ classes. For FB/Java I have created Java generator in cloop. Most of this file is auto generated: https://github.com/FirebirdSQL/fbjava/blob/master/src/fbjava-impl/src/main/java/org/firebirdsql/fbjava/impl/FbClientLibrary.java Similar thing could be done for C#. Adriano Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel