You provide the dll in binary form plus a header file. In your example, your header could look like:
- namespace name
-
{
-
class a; //forward reference
-
int fun1(a* obj,int i);
-
int fun2(a* obj,int j);
-
double getb(a* obj);
-
a* Create();
-
}
You provide a forward reference for your class. That's enough to allow the compiler to accept an a*. You can't actually create an "a" object without exposing the class and its constructors.
Next, you write a Create function to create and object and return pointer to it. This is a factory. Research the Factory design pattern.
Next, you provide interface functions that can interact with an "a" object whose pointer was obtained from Create. These interfact functions will have pointers to an "a" object argument plus the other arguments.
You are not required to provide an interface function for every method of your class but only the ones the dll users can call.
In effect your header is treating the entire dll as a class and the functions in the header are the methods available in the dll.