finish fixing the using list for windows.errors, more ffi bindings
parent
8ab4d39036
commit
65d76e6509
|
@ -2,7 +2,7 @@ USING: alien alien.c-types alien.syntax arrays continuations
|
||||||
destructors generic io.mmap io.ports io.backend.windows io.files.windows
|
destructors generic io.mmap io.ports io.backend.windows io.files.windows
|
||||||
kernel libc math math.bitwise namespaces quotations sequences windows
|
kernel libc math math.bitwise namespaces quotations sequences windows
|
||||||
windows.advapi32 windows.kernel32 io.backend system accessors
|
windows.advapi32 windows.kernel32 io.backend system accessors
|
||||||
io.backend.windows.privileges ;
|
io.backend.windows.privileges windows.errors ;
|
||||||
IN: io.backend.windows.nt.privileges
|
IN: io.backend.windows.nt.privileges
|
||||||
|
|
||||||
TYPEDEF: TOKEN_PRIVILEGES* PTOKEN_PRIVILEGES
|
TYPEDEF: TOKEN_PRIVILEGES* PTOKEN_PRIVILEGES
|
||||||
|
|
|
@ -2,7 +2,7 @@ USING: alien alien.c-types arrays destructors generic io.mmap
|
||||||
io.ports io.backend.windows io.files.windows io.backend.windows.privileges
|
io.ports io.backend.windows io.files.windows io.backend.windows.privileges
|
||||||
kernel libc math math.bitwise namespaces quotations sequences
|
kernel libc math math.bitwise namespaces quotations sequences
|
||||||
windows windows.advapi32 windows.kernel32 io.backend system
|
windows windows.advapi32 windows.kernel32 io.backend system
|
||||||
accessors locals ;
|
accessors locals windows.errors ;
|
||||||
IN: io.mmap.windows
|
IN: io.mmap.windows
|
||||||
|
|
||||||
: create-file-mapping ( hFile lpAttributes flProtect dwMaximumSizeHigh dwMaximumSizeLow lpName -- HANDLE )
|
: create-file-mapping ( hFile lpAttributes flProtect dwMaximumSizeHigh dwMaximumSizeLow lpName -- HANDLE )
|
||||||
|
@ -12,8 +12,8 @@ IN: io.mmap.windows
|
||||||
MapViewOfFile [ win32-error=0/f ] keep ;
|
MapViewOfFile [ win32-error=0/f ] keep ;
|
||||||
|
|
||||||
:: mmap-open ( path length access-mode create-mode protect access -- handle handle address )
|
:: mmap-open ( path length access-mode create-mode protect access -- handle handle address )
|
||||||
[let | lo [ length HEX: ffffffff bitand ]
|
[let | lo [ length 32 bits ]
|
||||||
hi [ length -32 shift HEX: ffffffff bitand ] |
|
hi [ length -32 shift 32 bits ] |
|
||||||
{ "SeCreateGlobalPrivilege" "SeLockMemoryPrivilege" } [
|
{ "SeCreateGlobalPrivilege" "SeLockMemoryPrivilege" } [
|
||||||
path access-mode create-mode 0 open-file |dispose
|
path access-mode create-mode 0 open-file |dispose
|
||||||
dup handle>> f protect hi lo f create-file-mapping |dispose
|
dup handle>> f protect hi lo f create-file-mapping |dispose
|
||||||
|
|
|
@ -894,15 +894,52 @@ FUNCTION: LONG RegCreateKeyExW ( HKEY hKey, LPCTSTR lpSubKey, DWORD Reserved, LP
|
||||||
! : RegCreateKeyW
|
! : RegCreateKeyW
|
||||||
! : RegDeleteKeyA ;
|
! : RegDeleteKeyA ;
|
||||||
! : RegDeleteKeyW ;
|
! : RegDeleteKeyW ;
|
||||||
|
|
||||||
|
FUNCTION: LONG RegDeleteKeyExW (
|
||||||
|
HKEY hKey,
|
||||||
|
LPCTSTR lpSubKey,
|
||||||
|
DWORD Reserved,
|
||||||
|
LPTSTR lpClass,
|
||||||
|
DWORD dwOptions,
|
||||||
|
REGSAM samDesired,
|
||||||
|
LPSECURITY_ATTRIBUTES lpSecurityAttributes,
|
||||||
|
PHKEY phkResult,
|
||||||
|
LPDWORD lpdwDisposition
|
||||||
|
) ;
|
||||||
|
|
||||||
|
ALIAS: RegDeleteKeyEx RegDeleteKeyExW
|
||||||
|
|
||||||
! : RegDeleteValueA ;
|
! : RegDeleteValueA ;
|
||||||
! : RegDeleteValueW ;
|
! : RegDeleteValueW ;
|
||||||
! : RegDisablePredefinedCache ;
|
! : RegDisablePredefinedCache ;
|
||||||
! : RegEnumKeyA ;
|
! : RegEnumKeyA ;
|
||||||
! : RegEnumKeyExA ;
|
! : RegEnumKeyExA ;
|
||||||
! : RegEnumKeyExW ;
|
FUNCTION: LONG RegEnumKeyExW (
|
||||||
|
HKEY hKey,
|
||||||
|
DWORD dwIndex,
|
||||||
|
LPTSTR lpName,
|
||||||
|
LPDWORD lpcName,
|
||||||
|
LPDWORD lpReserved,
|
||||||
|
LPTSTR lpClass,
|
||||||
|
LPDWORD lpcClass,
|
||||||
|
PFILETIME lpftLastWriteTime
|
||||||
|
) ;
|
||||||
! : RegEnumKeyW ;
|
! : RegEnumKeyW ;
|
||||||
! : RegEnumValueA ;
|
! : RegEnumValueA ;
|
||||||
! : RegEnumValueW ;
|
|
||||||
|
FUNCTION: LONG RegEnumValueW (
|
||||||
|
HKEY hKey,
|
||||||
|
DWORD dwIndex,
|
||||||
|
LPTSTR lpValueName,
|
||||||
|
LPDWORD lpcchValueName,
|
||||||
|
LPDWORD lpReserved,
|
||||||
|
LPDWORD lpType,
|
||||||
|
LPBYTE lpData,
|
||||||
|
LPDWORD lpcbData
|
||||||
|
) ;
|
||||||
|
|
||||||
|
ALIAS: RegEnumValue RegEnumValueW
|
||||||
|
|
||||||
! : RegFlushKey ;
|
! : RegFlushKey ;
|
||||||
! : RegGetKeySecurity ;
|
! : RegGetKeySecurity ;
|
||||||
! : RegLoadKeyA ;
|
! : RegLoadKeyA ;
|
||||||
|
|
|
@ -2,10 +2,10 @@ USING: windows.dinput windows.dinput.constants parser
|
||||||
alien.c-types windows.ole32 namespaces assocs kernel arrays
|
alien.c-types windows.ole32 namespaces assocs kernel arrays
|
||||||
vectors windows.kernel32 windows.com windows.dinput shuffle
|
vectors windows.kernel32 windows.com windows.dinput shuffle
|
||||||
windows.user32 windows.messages sequences combinators locals
|
windows.user32 windows.messages sequences combinators locals
|
||||||
math.rectangles accessors math windows alien
|
math.rectangles accessors math alien alien.strings
|
||||||
alien.strings io.encodings.utf16 io.encodings.utf16n
|
io.encodings.utf16 io.encodings.utf16n continuations
|
||||||
continuations byte-arrays game-input.dinput.keys-array
|
byte-arrays game-input.dinput.keys-array game-input
|
||||||
game-input ui.backend.windows ;
|
ui.backend.windows windows.errors ;
|
||||||
IN: game-input.dinput
|
IN: game-input.dinput
|
||||||
|
|
||||||
SINGLETON: dinput-game-input-backend
|
SINGLETON: dinput-game-input-backend
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
USING: alien alien.c-types alien.strings
|
USING: alien alien.c-types alien.strings
|
||||||
kernel libc math namespaces system-info.backend
|
kernel libc math namespaces system-info.backend
|
||||||
system-info.windows windows windows.advapi32
|
system-info.windows windows windows.advapi32
|
||||||
windows.kernel32 system byte-arrays ;
|
windows.kernel32 system byte-arrays windows.errors ;
|
||||||
IN: system-info.windows.nt
|
IN: system-info.windows.nt
|
||||||
|
|
||||||
M: winnt cpus ( -- n )
|
M: winnt cpus ( -- n )
|
||||||
|
@ -41,6 +41,6 @@ M: winnt available-virtual-mem ( -- n )
|
||||||
GetComputerName win32-error=0/f alien>native-string ;
|
GetComputerName win32-error=0/f alien>native-string ;
|
||||||
|
|
||||||
: username ( -- string )
|
: username ( -- string )
|
||||||
UNLEN 1+
|
UNLEN 1 +
|
||||||
[ <byte-array> dup ] keep <uint>
|
[ <byte-array> dup ] keep <uint>
|
||||||
GetUserName win32-error=0/f alien>native-string ;
|
GetUserName win32-error=0/f alien>native-string ;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
USING: alien alien.c-types kernel libc math namespaces
|
USING: alien alien.c-types kernel libc math namespaces
|
||||||
windows windows.kernel32 windows.advapi32
|
windows windows.kernel32 windows.advapi32
|
||||||
words combinators vocabs.loader system-info.backend
|
words combinators vocabs.loader system-info.backend
|
||||||
system alien.strings ;
|
system alien.strings windows.errors ;
|
||||||
IN: system-info.windows
|
IN: system-info.windows
|
||||||
|
|
||||||
: system-info ( -- SYSTEM_INFO )
|
: system-info ( -- SYSTEM_INFO )
|
||||||
|
|
Loading…
Reference in New Issue