>>Just one more thing... Using the usual "__declspec(dllexport)" didn't make the function visible. I had to put it in the .DEF file. If you have any idea why this is, I'd appreciate to know. But it's not that important. :-)
>
>Visual C++ is a C++ compiler, not a C compiler. In order to implement OOP, C++ compilers do strange things to function names. This is often referred to as “name mangling.” You must explicitly tell the compiler to give a function a standard (API) style function name. This is how I do it:
>
>extern "C" __declspec(dllexport) type function1();
>extern "C" __declspec(dllexport) type function2();
>
>or
>
>extern "C" {
> __declspec(dllexport) type function1();
> __declspec(dllexport) type function2();
>}
>
>The
extern "C"
declaration seems to only be necessary for the function prototype.
Why thank you! That helps and explains a lot. I've seen the 'extern "C"' before, but always though that the compiler would understand that I was trying to write C. I was wrong. :-)
Alexandre Nobre
Alpha Bytes Computer Corp.
Did you know that there are innocent people dying in East Timor?
It helps if you do...
I suppose you don't need glasses if you're able to read this line