Can somebody please explain to me how to use a dynamic link library, using C. This code I have just got from exsamles in my helpfiles, it does not work very well! :o) I am aware of the concept of dynamic linking...but the practical part hmm..
How would the following be done? Calling a function in a .dll displaying a message sent by a calling application?
char dllName = "test";
myInstance = LoadLibrary( dllName );
myProc = GetProcAddress( myInstance, "myPuts" );
myProc("message printed using the DLL function\n");
VOID _export myPuts(LPTSTR lpszMsg)
// Get a handle to the standard output device.
hStdout = GetStdHandle(STD_OUTPUT_HANDLE);
// Write a null-terminated string to the standard output device.
WriteFile(hStdout, lpszMsg++, 1, &cchWritten, NULL);