My C++ book didn't include any material regarding the use of dynamic and static link libaries. So I tried looking up the subject and all I could find where long snippets of confusing code which I didn't really understand. Anyway, I have had a go and it seems to be working (by the fact that I am not getting any compiler or run-time errors). Here is the code I have written:
In you're example you are dynamically loading a DLL. In this case, each function you want to call from that DLL you need to first call GetProcAddress to get the address of each function. You need to know the function signatures to call them correctly. Search for this function on the internet for examples.
Yes, then you can check whether it failed or succeeded, if it failed it will return 0
if ( u3d_init != 0 )
As Bob said you will need to know the function signatures, to do this you can open a command prompt, navigate to the directory of your DLL, and enter "dumpbin /exports Ultimate3D.dll" which will list all of the symbols that are exported from the DLL. The function names are often mangled so if you start off with a function called 'func(int a)' it might be exported with a signature of '_func@4' or it could get completely messed up, something like ?func@@YAXH@Z' so you need to determine the signature using dumpbin.