Diff

Not logged in

Differences From Artifact [cc2ab2b91c87057b]:

To Artifact [e4521a091f44ac97]:


3 import std.string; 3 import std.string; 4 import core.runtime; 4 import core.runtime; 5 5 6 alias extern(Windows) int function( HWND a, immutable char* b, char* c, DWORD d 6 alias extern(Windows) int function( HWND a, immutable char* b, char* c, DWORD d 7 7 8 void main() 8 void main() 9 { 9 { 10 HINSTANCE h = cast(HINSTANCE) Runtime.loadLibrary("QBga32.DLL"); < 11 for(;;) { 10 for(;;) { 12 write("> "); 11 write("> "); 13 string s = readln(); 12 string s = readln(); 14 if(s.length > 0) { 13 if(s.length > 0) { > 14 HINSTANCE h = cast(HINSTANCE) Runtime.loadLibrary("QBga3 15 CmdFuncT Bga = cast(CmdFuncT)GetProcAddress(h, "Bga"); 15 CmdFuncT Bga = cast(CmdFuncT)GetProcAddress(h, "Bga"); 16 int r = Bga(NULL, s.toStringz(), null, 0); 16 int r = Bga(NULL, s.toStringz(), null, 0); > 17 Runtime.unloadLibrary(h); 17 writeln("Return: ", r); 18 writeln("Return: ", r); 18 } 19 } 19 } 20 } 20 Runtime.unloadLibrary(h); < 21 } 21 }