| |
|
|
|
Description:
GetEnvironmentStrings supply a Zeiger on one aray with the Enviroment-Variables the current Prozesses back. The Enviroment-Variables are the shape ‚Variable=Wert’ gelistet and through Nullbytes voneinander separated. The block becomes through one doppeltes Nullbyte completed. The area must mach the Use with FreeEnvironmentStrings again released go..
Deklaration:
Def @GetEnvironmentStrings(0) !kernel32,GetEnvironmentStringsA
Parameter:
These function has no Parameter.
Return Value:
One Pointer (address) on The Enviroment-Variables one Prozesses.
Examples:
CompileMarkSeparationDef @GetEnvironmentStrings(0) !"kernel32","GetEnvironmentStringsA"
DEF @FreeEnvironmentStrings(1) !"kernel32","FreeEnvironmentStringsA"
Declare INV#,INV_POINTER&,INV$,Zähler%,INV_BUF_Länge&
LET INV_BUF_Länge&=1024*16
DIM inv#,INV_BUF_Länge&
Clear INV#
LET INV_POINTER&=@GetEnvironmentStrings()
LET inv#=INV_POINTER&
Let Zähler%=0
WHILE @String$(INV#,Zähler%)<>""
LET INV$=@String$(INV#,Zähler%)
ADDSTRING INV$
LET Zähler%=Zähler%+@LEN(INV$)+1
WEND
ADDSTRING ""
ADDSTRING ""
Let Zähler%=0
WHILE @String$(INV#,Zähler%)<>""
LET INV$=@String$(INV#,Zähler%)
LET Zähler%=Zähler%+@LEN(INV$)+1
LET INV$=@SubStr$(INV$,1,"=")
ADDSTRING INV$
WEND
@FreeEnvironmentStrings(INV_POINTER&)
Dispose inv#
@LISTBOX$("Liste aller Umgebungsvariablen des Prozesses:",pan>)
[keywords:027711e3d9] Enviroment-Variables read to determine Pointer Zeiger lists list [/keywords:027711e3d9] |
|
|
| |
|
|