LISTING 1:
Win32 API Function Declarations
'Declare the needed Win32 API functions
Declare Function GetEnvironmentVariable Lib "kernel32"
Alias _
"GetEnvironmentVariableA" (ByVal bsName As String, _
ByVal buff As String, ByVal ch As Long) As Long
Declare Function GetStdHandle Lib "kernel32"
_
(ByVal nStdHandle As Long) As Long
Declare Function ReadFile Lib "kernel32" _
(ByVal hFile As Long, lpBuffer As Any, _
ByVal nNumberOfBytesToRead As Long, _
lpNumberOfBytesRead As Long, _
lpOverlapped As Any) As Long
Declare Function WriteFile Lib "kernel32" _
(ByVal hFile As Long, ByVal lpBuffer As String, _
ByVal nNumberOfBytesToWrite As Long, _
lpNumberOfBytesWritten As Long, _
lpOverlapped As Any) As Long