Thanks for the quick response but, I already did a search and found that. Anyways, Ian M. posted this code.
// Load the library
HANDLE MyDLL = LoadLibrary("MyDLL.dll");
// This creates a new function pointer type that accepts an
// int argument, and returns an int result.
typedef int (*HelloFnPtr)(int);
// This creates the function pointer itself
HelloFnPtr Hello;
// This fills the function pointer with the address of the function
// within the DLL
Hello = (HelloFnPtr)GetProcAddress("Hello");
// Finally, we can call the function as if it was a standard
// C function
int x = Hello(1);
// Free the DLL - after this point, it is no longer safe to call
// the Hello function via the function pointer.
FreeLibrary(MyDLL);
unfortunatly this also does not work this line in specific.
Hello = (HelloFnPtr)GetProcAddress("Hello");
the compiler gives me this error
1>c:\documents and settings\david\my documents\visual studio 2008\projects\dbpvsgdk\dbpvsgdk\main.cpp(30) : error C2440: '=' : cannot convert from 'int' to 'HelloFnPtr'
1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
1>c:\documents and settings\david\my documents\visual studio 2008\projects\dbpvsgdk\dbpvsgdk\main.cpp(30) : error C2146: syntax error : missing ';' before identifier 'GetProcAddress'
1>c:\documents and settings\david\my documents\visual studio 2008\projects\dbpvsgdk\dbpvsgdk\main.cpp(30) : error C2660: 'GetProcAddress' : function does not take 1 arguments
1>Build log was saved at "file://c:\Documents and Settings\David\My Documents\Visual Studio 2008\Projects\DbpVsGDK\DbpVsGDK\Debug\BuildLog.htm"
1>DbpVsGDK - 3 error(s), 0 warning(s)
I am not a c++ expert but I can figure it out. Anyways, if I can just figure this out, then I'll be able to move to the next part. LOL.