Project tree simplified

This commit is contained in:
2020-05-23 16:55:40 +03:00
parent 238356dff9
commit c012f5134c
59 changed files with 74 additions and 74 deletions

View File

@@ -0,0 +1,36 @@
program GetCurrentDir;
uses
KolibriOS;
const
AppPath = PPKolibriChar(32);
CmdLine = PPKolibriChar(28);
BUFFER_SIZE = 256;
var
hConsole: Pointer;
ConsoleInit: procedure(WndWidth, WndHeight, ScrWidth, ScrHeight: LongWord; Caption: PKolibriChar); stdcall;
ConsoleExit: procedure(bCloseWindow: Cardinal); stdcall;
printf: function(const Format: PKolibriChar): Integer; CDecl varargs;
Buffer: array[0..BUFFER_SIZE - 1] of Char;
begin
hConsole := LoadLibrary('/sys/lib/console.obj');
ConsoleInit := GetProcAddress(hConsole, 'con_init');
ConsoleExit := GetProcAddress(hConsole, 'con_exit');
printf := GetProcAddress(hConsole, 'con_printf');
ConsoleInit($FFFFFFFF, $FFFFFFFF, $FFFFFFFF, $FFFFFFFF, 'Test');
GetCurrentDirectory(Buffer, BUFFER_SIZE);
printf('AppPath is "%s"'#10, AppPath^);
printf('CmdLine is "%s"'#10, CmdLine^);
printf('CurrentDirectory is "%s"'#10, Buffer);
ConsoleExit(0);
TerminateThread;
end.