source: Include/basic.sbp@ 46

Last change on this file since 46 was 35, checked in by イグトランス (egtra), 18 years ago

OLE Automation関数などの追加
KERNEL関数などの追加

File size: 2.3 KB
Line 
1'basic.sbp
2
3
4#ifndef _INC_BASIC
5#define _INC_BASIC
6
7
8Sub _System_InitDllGlobalVariables() 'dummy
9End Sub
10
11
12Const LONG_MAX = &H7FFFFFFF
13Const LONG_MIN = &H80000000
14
15Const FLT_MAX = 3.402823466e+38
16Const FLT_MIN = 1.175494351e-38
17
18'-------------
19' Basic Types
20'-------------
21
22'Char
23'Byte
24'Integer
25'Word
26'Long
27TypeDef Int32 = Long
28'DWord
29'Int64
30'QWord
31'Single
32'Double
33
34TypeDef BOOL = Long
35
36
37
38'------------------
39' Types of pointer
40'------------------
41TypeDef BytePtr = *Byte
42TypeDef WordPtr = *Word
43TypeDef DWordPtr = *DWord
44TypeDef SinglePtr = *Single
45TypeDef DoublePtr = *Double
46
47#ifdef _WIN64
48TypeDef LONG_PTR = Int64
49TypeDef ULONG_PTR = QWord
50TypeDef HALF_PTR = Long
51TypeDef UHALF_PTR = DWord
52#else
53TypeDef LONG_PTR = Long
54TypeDef ULONG_PTR = DWord
55TypeDef HALF_PTR = Integer
56TypeDef UHALF_PTR = Word
57#endif
58TypeDef DWORD_PTR = ULONG_PTR
59
60Sub 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
66End Sub
67
68Function 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
74End Function
75
76TypeDef SIZE_T = ULONG_PTR
77TypeDef SSIZE_T = LONG_PTR
78
79TypeDef WCHAR = Word
80
81'--------------------------
82' Specify elements number
83'--------------------------
84Const ELM(n) = n - 1
85
86#include <windows.sbp>
87#include <crt.sbp>
88#include <objbase.sbp>
89
90
91Sub _System_GetEip() 'dummy
92End Sub
93
94
95Dim _System_CriticalSection As CRITICAL_SECTION
96Dim _System_hProcessHeap As HANDLE
97
98Sub _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()
112End Sub
113
114Sub _System_EndProgram()
115 DeleteCriticalSection(_System_CriticalSection)
116End 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
Note: See TracBrowser for help on using the repository browser.