A basic dll has only one function -- DllMain() which is similar to main() in a normal C/C++ program. And you compiler will generate the code for that. You will want to manually create a header file that contains the prototypes of the functions you want to export. This is for other C/C++ programs that will use your dll, but won't probably need it for VB6. I don't know how you will declare the function in VB6.
This will export one function -- foo().
Code:
// This is the C source file
// includes here
#include <all includes here>
#ifdef __cplusplus
extern "C" {
#endif
__declspec( dllexport ) int foo()
{
return 0;
}
#ifdef __cplusplus
}
#endif