1 | 'basic.sbp
|
---|
2 |
|
---|
3 |
|
---|
4 | #ifndef _INC_BASIC
|
---|
5 | #define _INC_BASIC
|
---|
6 |
|
---|
7 |
|
---|
8 | Sub _System_InitDllGlobalVariables() 'dummy
|
---|
9 | End Sub
|
---|
10 |
|
---|
11 |
|
---|
12 | Const LONG_MAX = &H7FFFFFFF
|
---|
13 | Const LONG_MIN = &H80000000
|
---|
14 |
|
---|
15 | Const FLT_MAX = 3.402823466e+38
|
---|
16 | Const FLT_MIN = 1.175494351e-38
|
---|
17 |
|
---|
18 | '-------------
|
---|
19 | ' Basic Types
|
---|
20 | '-------------
|
---|
21 |
|
---|
22 | 'Char
|
---|
23 | 'Byte
|
---|
24 | 'Integer
|
---|
25 | 'Word
|
---|
26 | 'Long
|
---|
27 | TypeDef Int32 = Long
|
---|
28 | 'DWord
|
---|
29 | 'Int64
|
---|
30 | 'QWord
|
---|
31 | 'Single
|
---|
32 | 'Double
|
---|
33 |
|
---|
34 | TypeDef BOOL = Long
|
---|
35 |
|
---|
36 |
|
---|
37 |
|
---|
38 | '------------------
|
---|
39 | ' Types of pointer
|
---|
40 | '------------------
|
---|
41 | TypeDef BytePtr = *Byte
|
---|
42 | TypeDef WordPtr = *Word
|
---|
43 | TypeDef DWordPtr = *DWord
|
---|
44 | TypeDef SinglePtr = *Single
|
---|
45 | TypeDef DoublePtr = *Double
|
---|
46 |
|
---|
47 | #ifdef _WIN64
|
---|
48 | TypeDef LONG_PTR = Int64
|
---|
49 | TypeDef ULONG_PTR = QWord
|
---|
50 | TypeDef HALF_PTR = Long
|
---|
51 | TypeDef UHALF_PTR = DWord
|
---|
52 | #else
|
---|
53 | TypeDef LONG_PTR = Long
|
---|
54 | TypeDef ULONG_PTR = DWord
|
---|
55 | TypeDef HALF_PTR = Integer
|
---|
56 | TypeDef UHALF_PTR = Word
|
---|
57 | #endif
|
---|
58 | TypeDef DWORD_PTR = ULONG_PTR
|
---|
59 |
|
---|
60 | Sub Set_LONG_PTR(pPtr As VoidPtr, lpData As LONG_PTR)
|
---|
61 | #ifdef _WIN64
|
---|
62 | SetQWord(pPtr,lpData)
|
---|
63 | #else
|
---|
64 | SetDWord(pPtr,lpData)
|
---|
65 | #endif
|
---|
66 | End Sub
|
---|
67 |
|
---|
68 | Function Get_LONG_PTR(pPtr As VoidPtr) As LONG_PTR
|
---|
69 | #ifdef _WIN64
|
---|
70 | Get_LONG_PTR = GetQWord(pPtr)
|
---|
71 | #else
|
---|
72 | Get_LONG_PTR = GetDWord(pPtr)
|
---|
73 | #endif
|
---|
74 | End Function
|
---|
75 |
|
---|
76 | TypeDef SIZE_T = ULONG_PTR
|
---|
77 | TypeDef SSIZE_T = LONG_PTR
|
---|
78 |
|
---|
79 | TypeDef WCHAR = Word
|
---|
80 |
|
---|
81 | '--------------------------
|
---|
82 | ' Specify elements number
|
---|
83 | '--------------------------
|
---|
84 | Const ELM(n) = n - 1
|
---|
85 |
|
---|
86 | #include <windows.sbp>
|
---|
87 | #include <crt.sbp>
|
---|
88 | #include <objbase.sbp>
|
---|
89 |
|
---|
90 |
|
---|
91 | Sub _System_GetEip() 'dummy
|
---|
92 | End Sub
|
---|
93 |
|
---|
94 |
|
---|
95 | Dim _System_CriticalSection As CRITICAL_SECTION
|
---|
96 | Dim _System_hProcessHeap As HANDLE
|
---|
97 |
|
---|
98 | Sub _System_StartupProgram()
|
---|
99 | 'この関数はアプリケーションの起動時にシステムからコールバックされます
|
---|
100 |
|
---|
101 | InitializeCriticalSection(_System_CriticalSection)
|
---|
102 |
|
---|
103 | _System_hProcessHeap=HeapCreate(HEAP_GENERATE_EXCEPTIONS,0,0)
|
---|
104 |
|
---|
105 | _System_GC._System_CGarbageCollection()
|
---|
106 |
|
---|
107 | 'Initialize global variables
|
---|
108 | _System_InitDllGlobalVariables()
|
---|
109 |
|
---|
110 | 'Initialize static variables
|
---|
111 | _System_InitStaticLocalVariables()
|
---|
112 | End Sub
|
---|
113 |
|
---|
114 | Sub _System_EndProgram()
|
---|
115 | DeleteCriticalSection(_System_CriticalSection)
|
---|
116 | End Sub
|
---|
117 |
|
---|
118 |
|
---|
119 |
|
---|
120 | #include <system\string.sbp>
|
---|
121 | #include <system\debug.sbp>
|
---|
122 | #include <system\gc.sbp>
|
---|
123 | #include <system\enum.sbp>
|
---|
124 |
|
---|
125 | #include <Classes\index.ab>
|
---|
126 |
|
---|
127 |
|
---|
128 | #include <basic\function.sbp>
|
---|
129 | #include <basic\command.sbp>
|
---|
130 |
|
---|
131 |
|
---|
132 | #endif '_INC_BASIC
|
---|