forked from petrSchreiber/thinBasic_enVar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththinBasic_EnVar.bas
83 lines (59 loc) · 2.25 KB
/
thinBasic_EnVar.bas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
'
' Module for thinBASIC
'
' -----------------------------------------------------------------------------
#COMPILE DLL
#REGISTER NONE
#DIM ALL
' -- The version itself should reflect the targetted thinBasic version
#RESOURCE VERSIONINFO
#RESOURCE FILEVERSION 1, 9, 16, 1
#RESOURCE PRODUCTVERSION 1, 9, 16, 1
#RESOURCE STRINGINFO "0409", "04B0"
#RESOURCE VERSION$ "CompanyName", "Petr Schreiber"
#RESOURCE VERSION$ "FileDescription", "Module for Environment Variables handling"
#RESOURCE VERSION$ "FileVersion", "1.9.16.1"
#RESOURCE VERSION$ "InternalName", "EnVars"
#RESOURCE VERSION$ "OriginalFilename", "ThinBASIC_EnVar.dll"
#RESOURCE VERSION$ "LegalCopyright", "Copyright © Petr Schreiber 2016"
#RESOURCE VERSION$ "ProductName", "thinBasic_EnVar"
#RESOURCE VERSION$ "ProductVersion", "1.9.16.1"
#RESOURCE VERSION$ "Comments", "Support site: http://www.thinbasic.com/"
' -----------------------------------------------------------------------------
' -- thinBASIC module SDK
#INCLUDE "thinCore.inc"
' -- functionality exposed to ThinBASIC
#INCLUDE "Module_thinBASICInterface.inc
'----------------------------------------------------------------------------
FUNCTION LoadLocalSymbols ALIAS "LoadLocalSymbols" (OPTIONAL BYVAL sPath AS STRING) EXPORT AS LONG
' -- exposes the functionality to thinBasic
Module_LoadSymbols()
FUNCTION = 0&
END FUNCTION
' -----------------------------------------------------------------------------
FUNCTION UnLoadLocalSymbols ALIAS "UnLoadLocalSymbols" () EXPORT AS LONG
FUNCTION = 0&
END FUNCTION
' -----------------------------------------------------------------------------
%DLL_PROCESS_ATTACH = 1
%DLL_THREAD_ATTACH = 2
%DLL_THREAD_DETACH = 3
%DLL_PROCESS_DETACH = 0
FUNCTION LIBMAIN ALIAS "LibMain" (BYVAL hInstance AS LONG, _
BYVAL fwdReason AS LONG, _
BYVAL lpvReserved AS LONG) EXPORT AS LONG
SELECT CASE fwdReason
CASE %DLL_PROCESS_ATTACH
FUNCTION = 1
EXIT FUNCTION
CASE %DLL_PROCESS_DETACH
FUNCTION = 1
EXIT FUNCTION
CASE %DLL_THREAD_ATTACH
FUNCTION = 1
EXIT FUNCTION
CASE %DLL_THREAD_DETACH
FUNCTION = 1
EXIT FUNCTION
END SELECT
END FUNCTION