Am curious about the use of DLLs
I wrote a DLL with a single function
Code: Select all
#include <stdio.h>
void hello ()
{
printf ("Hello World!\n");
}
I verified the DLL was written correctly and could actually see the "hello" function name using LibrayFunctionName() but when I run the following code, "Hello World" fails to show up in the console.
Code: Select all
If OpenLibrary(0, "mydll.dll")
OpenConsole()
CallFunction(0,"hello")
Delay(2000)
CloseConsole()
EndIf
CloseLibrary(0)
I rewrote the hello function as an addition returning an integer and that seems to work but why doesn't printf?