Subversion Repositories Kolibri OS

Rev

Rev 6613 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6613 Rev 7107
Line 1... Line 1...
1
(*
1
(*
2
    Copyright 2016 Anton Krotov
2
    Copyright 2016, 2017 Anton Krotov
Line 3... Line 3...
3
 
3
 
4
    This program is free software: you can redistribute it and/or modify
4
    This program is free software: you can redistribute it and/or modify
5
    it under the terms of the GNU Lesser General Public License as published by
5
    it under the terms of the GNU Lesser General Public License as published by
6
    the Free Software Foundation, either version 3 of the License, or
6
    the Free Software Foundation, either version 3 of the License, or
Line 23... Line 23...
23
 
23
 
24
  Alloc*: PROCEDURE [winapi] (uFlags, dwBytes: INTEGER): INTEGER;
24
  Alloc*: PROCEDURE [winapi] (uFlags, dwBytes: INTEGER): INTEGER;
25
  Free*: PROCEDURE [winapi] (hMem: INTEGER): INTEGER;
25
  Free*: PROCEDURE [winapi] (hMem: INTEGER): INTEGER;
26
  MessageBoxA*: PROCEDURE [winapi] (hWnd, lpText, lpCaption, uType: INTEGER): INTEGER;
26
  MessageBoxA*: PROCEDURE [winapi] (hWnd, lpText, lpCaption, uType: INTEGER): INTEGER;
-
 
27
  ExitProcess*: PROCEDURE [winapi] (code: INTEGER);
-
 
28
  ExitThread*: PROCEDURE [winapi] (code: INTEGER);
27
  ExitProcess*: PROCEDURE [winapi] (code: INTEGER);
29
  GetCurrentThreadId*: PROCEDURE [winapi] (): INTEGER;
Line 28... Line 30...
28
  strncmp*: PROCEDURE [cdecl] (a, b, n: INTEGER): INTEGER;
30
  strncmp*: PROCEDURE [cdecl] (a, b, n: INTEGER): INTEGER;
29
 
31
 
Line 60... Line 62...
60
  sys.GET(esp, GetProcAddress);
62
  sys.GET(esp, GetProcAddress);
61
  sys.GET(esp + 4, LoadLibraryA);
63
  sys.GET(esp + 4, LoadLibraryA);
Line 62... Line 64...
62
 
64
 
63
  lib := LoadLibraryA(sys.ADR("kernel32.dll"));
65
  lib := LoadLibraryA(sys.ADR("kernel32.dll"));
-
 
66
  GetProc("ExitProcess", lib, sys.ADR(ExitProcess));
-
 
67
  GetProc("ExitThread", lib, sys.ADR(ExitThread));
64
  GetProc("ExitProcess", lib, sys.ADR(ExitProcess));
68
  GetProc("GetCurrentThreadId", lib, sys.ADR(GetCurrentThreadId));
65
  GetProc("GlobalAlloc", lib, sys.ADR(Alloc));
69
  GetProc("GlobalAlloc", lib, sys.ADR(Alloc));
Line 66... Line 70...
66
  GetProc("GlobalFree", lib, sys.ADR(Free));
70
  GetProc("GlobalFree", lib, sys.ADR(Free));
67
 
71