I\'m creating a C api that hides some functionality in a DLL file.
Since everything is C++ on the inside most of the functions works against handles which maps direc
Use an opaque struct. This is a good idea in many cases when defining the interface to a library in C: it improves modularity, hides unnecessary detail
As JamieH said, you get an opaque struct by declaring - but not defining - a struct. It's perfectly valid to have, and pass, pointers to the opaque struct into the libraries functions as arguments and return them as values. Users of library however cannot create or modify objects of the opaque struct since it's size and content is unknown.
The C standard library, and many others, already use this approach so it should be familiar. The cannonical example is the use of FILE *: fopen() creates and initialises the struct and returns a pointer to it, fclose() cleans up and releases it and all other i/o functions get their context from the passed in FILE *.