Module Winkern.pkg
1//************************************************************************
2//--- WinKern.pkg Symbolic Constants
3//
4// Copyright (c) 1983-1997 Data Access Corporation, Miami Florida,
5// All rights reserved.
6// DataFlex is a registered trademark of Data Access Corporation.
7//
8//************************************************************************
9// Description:
10// Windows' Kernel32 API Functions, Declarations & Constants
11//
12// Author: Stuart W. Booth
13//************************************************************************
14Use DFTypes.pkg
15
16// GetLastError constants
17Define NO_ERROR for 0
18
19// FormatMessage constants
20Define FORMAT_MESSAGE_ALLOCATE_BUFFER for |CI$00000100
21Define FORMAT_MESSAGE_IGNORE_INSERTS for |CI$00000200
22Define FORMAT_MESSAGE_FROM_STRING for |CI$00000400
23Define FORMAT_MESSAGE_FROM_HMODULE for |CI$00000800
24Define FORMAT_MESSAGE_FROM_SYSTEM for |CI$00001000
25Define FORMAT_MESSAGE_ARGUMENT_ARRAY for |CI$00002000
26Define FORMAT_MESSAGE_MAX_WIDTH_MASK for |CI$000000FF
27
28External_Function CopyMemory "RtlMoveMemory" Kernel32.dll ;
29 POINTER psDest POINTER psSource DWORD cChars Returns VOID_TYPE
30
31External_Function DeleteFile "DeleteFileA" Kernel32.Dll ;
32 Pointer lpFileName ;
33 Returns Integer
34
35External_Function FormatMessage "FormatMessageA" KERNEL32.DLL ;
36 dWord dwFlags ;
37 Pointer lpSource ;
38 dWord dwMessageId ;
39 dWord dwLanguageId ;
40 Pointer lpBuffer ;
41 dWord nSize ;
42 Pointer Arguments ;
43 Returns dWord
44
45External_Function FreeLibrary "FreeLibrary" Kernel32.dll ;
46 Integer hInstLib returns VOID_TYPE
47
48External_Function GetCommandLine "GetCommandLineA" Kernel32.dll ;
49 Returns Pointer
50
51External_Function GetFullPathName "GetFullPathNameA" Kernel32.dll ;
52 String sFileName DWord nBufferLength Pointer lpBuffer Pointer lpFilePart Returns Integer
53
54External_Function GetModuleHandle "GetModuleHandleA" Kernel32.dll ;
55 Address aModule Returns Handle
56
57External_Function GetLastError "GetLastError" Kernel32.Dll ;
58 Returns Integer
59
60External_Function SetLastError "SetLastError" Kernel32.Dll ;
61 DWord dwErrCode ; // WinAPI error code
62 Returns Integer // Returns Void
63
64External_Function GetFileAttributes "GetFileAttributesA" Kernel32.dll ;
65 String sFileName Returns Dword
66
67External_Function LoadLibrary "LoadLibraryA" Kernel32.dll ;
68 String sFileName returns Integer
69
70External_Function LocalFree "LocalFree" KERNEL32.DLL ;
71 Handle hMem ;
72 Returns Integer
73
74External_Function LocalLock "LocalLock" KERNEL32.DLL ;
75 Handle hMem ;
76 Returns Pointer
77
78External_Function LocalUnlock "LocalUnlock" KERNEL32.DLL ;
79 Handle hMem ;
80 Returns Integer
81
82Define Locale_User_Default for |CI$0400
83Define Locale_SCurrency for |CI$0014
84
85External_Function GetLocaleInfo "GetLocaleInfoA" Kernel32.dll ;
86 DWORD LCID DWORD LCTYPE POINTER lpLCDATA Integer cchData Returns Integer
87
88External_Function SetCurrentDirectory "SetCurrentDirectoryA" Kernel32.dll ;
89 String sDirectory ;
90Returns Integer
91
92External_Function GetModuleFileName "GetModuleFileNameA" Kernel32.dll ;
93 Handle hModule Address sFilename UInteger nSize Returns UInteger
94
95External_Function IsDebuggerPresent 'IsDebuggerPresent' Kernel32.dll ;
96 Returns Boolean
97
98
99