Diff

Not logged in

Differences From Artifact [cc2ab2b91c87057b]:

To Artifact [e4521a091f44ac97]:


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