Reverse pinvoking is it possible

I would like to crystal reports from win32 code so is it possible to reverse pinvoke or is there another report generation library for c.
By reverse pinvoking do you mean calling managed code from native?

Yes, that is possible, but not trivial. Basically you'll need to start up .NET virtual machine set-up its environment, and then call needed functions. Here's an example how to do it: https://support.microsoft.com/en-...t-managed-method-from-native-code

Another option is to expose managed class as COM interface. And then use COM functionality in native code to call it. Here's an example how to do it: https://support.microsoft.com/en-...udio.net-or-in-visual-studio-2005 If managed library you want to call doesn't expose COM interface, you can simply write small wrapper that will do it and use managed library through this COM wrapper.

Edited by Mārtiņš Možeiko on
Well it looks hard so if there any alternative for crystal reports or any report generation library in c?
No idea what Crystal Reports does. Why not write data to text/binary file from your C code, and then call .NET executable to read it and do whatever you need in those Reports?
Thanks i'll see through that.