Skip to content

Latest commit

 

History

History
46 lines (31 loc) · 1.03 KB

File metadata and controls

46 lines (31 loc) · 1.03 KB

Home

Obtaining the System and Windows folder names

Before you begin:

See also:


Code:

DECLARE INTEGER GetWindowsDirectory IN kernel32;
	STRING @lpBuffer, INTEGER nSize

DECLARE INTEGER GetSystemDirectory IN kernel32;
	STRING @ lpBuffer, INTEGER nSize

LOCAL lpBuffer, nSizeRet

lpBuffer = SPACE (250)
nSizeRet = GetSystemDirectory(@lpBuffer, Len(lpBuffer))
lpBuffer = SUBSTR (lpBuffer, 1, nSizeRet)
? lpBuffer

lpBuffer = SPACE (250)
nSizeRet = GetWindowsDirectory(@lpBuffer, Len(lpBuffer))
lpBuffer = SUBSTR (lpBuffer, 1, nSizeRet)
? lpBuffer  

Listed functions:

GetSystemDirectory
GetWindowsDirectory

Comment:

? GetEnv("windir")