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 | ' Boolena型の定数
|
---|
38 | Const True = 1 As Boolean
|
---|
39 | Const False = 0 As Boolean
|
---|
40 |
|
---|
41 |
|
---|
42 |
|
---|
43 | '------------------
|
---|
44 | ' Types of pointer
|
---|
45 | '------------------
|
---|
46 | TypeDef BytePtr = *Byte
|
---|
47 | TypeDef WordPtr = *Word
|
---|
48 | TypeDef DWordPtr = *DWord
|
---|
49 | TypeDef SinglePtr = *Single
|
---|
50 | TypeDef DoublePtr = *Double
|
---|
51 |
|
---|
52 | #ifdef _WIN64
|
---|
53 | TypeDef LONG_PTR = Int64
|
---|
54 | TypeDef ULONG_PTR = QWord
|
---|
55 | TypeDef HALF_PTR = Long
|
---|
56 | TypeDef UHALF_PTR = DWord
|
---|
57 | #else
|
---|
58 | TypeDef LONG_PTR = Long
|
---|
59 | TypeDef ULONG_PTR = DWord
|
---|
60 | TypeDef HALF_PTR = Integer
|
---|
61 | TypeDef UHALF_PTR = Word
|
---|
62 | #endif
|
---|
63 | TypeDef DWORD_PTR = ULONG_PTR
|
---|
64 |
|
---|
65 | Sub Set_LONG_PTR(pPtr As VoidPtr, lpData As LONG_PTR)
|
---|
66 | #ifdef _WIN64
|
---|
67 | SetQWord(pPtr,lpData)
|
---|
68 | #else
|
---|
69 | SetDWord(pPtr,lpData)
|
---|
70 | #endif
|
---|
71 | End Sub
|
---|
72 |
|
---|
73 | Function Get_LONG_PTR(pPtr As VoidPtr) As LONG_PTR
|
---|
74 | #ifdef _WIN64
|
---|
75 | Get_LONG_PTR = GetQWord(pPtr)
|
---|
76 | #else
|
---|
77 | Get_LONG_PTR = GetDWord(pPtr)
|
---|
78 | #endif
|
---|
79 | End Function
|
---|
80 |
|
---|
81 | TypeDef SIZE_T = ULONG_PTR
|
---|
82 | TypeDef SSIZE_T = LONG_PTR
|
---|
83 |
|
---|
84 | TypeDef WCHAR = Word
|
---|
85 |
|
---|
86 | '--------------------------
|
---|
87 | ' Specify elements number
|
---|
88 | '--------------------------
|
---|
89 | Const ELM(n) = n - 1
|
---|
90 |
|
---|
91 | #include <windows.sbp>
|
---|
92 | #include <crt.sbp>
|
---|
93 | #include <objbase.sbp>
|
---|
94 |
|
---|
95 |
|
---|
96 | Sub _System_GetEip() 'dummy
|
---|
97 | End Sub
|
---|
98 |
|
---|
99 |
|
---|
100 | Dim _System_CriticalSection As CRITICAL_SECTION
|
---|
101 | Dim _System_hProcessHeap As HANDLE
|
---|
102 |
|
---|
103 | Sub _System_StartupProgram()
|
---|
104 | 'この関数はアプリケーションの起動時にシステムからコールバックされます
|
---|
105 |
|
---|
106 | InitializeCriticalSection(_System_CriticalSection)
|
---|
107 |
|
---|
108 | _System_hProcessHeap=HeapCreate(HEAP_GENERATE_EXCEPTIONS,0,0)
|
---|
109 |
|
---|
110 | _System_GC._System_CGarbageCollection()
|
---|
111 |
|
---|
112 | 'Initialize global variables
|
---|
113 | _System_InitDllGlobalVariables()
|
---|
114 |
|
---|
115 | 'Initialize static variables
|
---|
116 | _System_InitStaticLocalVariables()
|
---|
117 | End Sub
|
---|
118 |
|
---|
119 | Sub _System_EndProgram()
|
---|
120 | DeleteCriticalSection(_System_CriticalSection)
|
---|
121 | End Sub
|
---|
122 |
|
---|
123 |
|
---|
124 |
|
---|
125 | #include <system\string.sbp>
|
---|
126 | #include <system\debug.sbp>
|
---|
127 | #include <system\gc.sbp>
|
---|
128 | #include <system\enum.sbp>
|
---|
129 | #include <system\exception.ab>
|
---|
130 |
|
---|
131 | #include <Classes\index.ab>
|
---|
132 |
|
---|
133 |
|
---|
134 | #include <basic\function.sbp>
|
---|
135 | #include <basic\command.sbp>
|
---|
136 |
|
---|
137 |
|
---|
138 | #endif '_INC_BASIC
|
---|