Using DLLs
Posted: Sat Mar 28, 2009 1:21 am
Am curious about the use of DLLs
I wrote a DLL with a single function
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.
I rewrote the hello function as an addition returning an integer and that seems to work but why doesn't printf?
I wrote a DLL with a single function
Code: Select all
#include <stdio.h>
void hello ()
{
printf ("Hello World!\n");
}Code: Select all
If OpenLibrary(0, "mydll.dll")
OpenConsole()
CallFunction(0,"hello")
Delay(2000)
CloseConsole()
EndIf
CloseLibrary(0)