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
|
||||
kernel libc math math.bitwise namespaces quotations sequences windows
|
||||
windows.advapi32 windows.kernel32 io.backend system accessors
|
||||
io.backend.windows.privileges ;
|
||||
io.backend.windows.privileges windows.errors ;
|
||||
IN: io.backend.windows.nt.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
|
||||
kernel libc math math.bitwise namespaces quotations sequences
|
||||
windows windows.advapi32 windows.kernel32 io.backend system
|
||||
accessors locals ;
|
||||
accessors locals windows.errors ;
|
||||
IN: io.mmap.windows
|
||||
|
||||
: create-file-mapping ( hFile lpAttributes flProtect dwMaximumSizeHigh dwMaximumSizeLow lpName -- HANDLE )
|
||||
|
@ -12,8 +12,8 @@ IN: io.mmap.windows
|
|||
MapViewOfFile [ win32-error=0/f ] keep ;
|
||||
|
||||
:: mmap-open ( path length access-mode create-mode protect access -- handle handle address )
|
||||
[let | lo [ length HEX: ffffffff bitand ]
|
||||
hi [ length -32 shift HEX: ffffffff bitand ] |
|
||||
[let | lo [ length 32 bits ]
|
||||
hi [ length -32 shift 32 bits ] |
|
||||
{ "SeCreateGlobalPrivilege" "SeLockMemoryPrivilege" } [
|
||||
path access-mode create-mode 0 open-file |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
|
||||
! : RegDeleteKeyA ;
|
||||
! : 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 ;
|
||||
! : RegDeleteValueW ;
|
||||
! : RegDisablePredefinedCache ;
|
||||
! : RegEnumKeyA ;
|
||||
! : RegEnumKeyExA ;
|
||||
! : RegEnumKeyExW ;
|
||||
FUNCTION: LONG RegEnumKeyExW (
|
||||
HKEY hKey,
|
||||
DWORD dwIndex,
|
||||
LPTSTR lpName,
|
||||
LPDWORD lpcName,
|
||||
LPDWORD lpReserved,
|
||||
LPTSTR lpClass,
|
||||
LPDWORD lpcClass,
|
||||
PFILETIME lpftLastWriteTime
|
||||
) ;
|
||||
! : RegEnumKeyW ;
|
||||
! : 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 ;
|
||||
! : RegGetKeySecurity ;
|
||||
! : RegLoadKeyA ;
|
||||
|
|
|
@ -2,10 +2,10 @@ USING: windows.dinput windows.dinput.constants parser
|
|||
alien.c-types windows.ole32 namespaces assocs kernel arrays
|
||||
vectors windows.kernel32 windows.com windows.dinput shuffle
|
||||
windows.user32 windows.messages sequences combinators locals
|
||||
math.rectangles accessors math windows alien
|
||||
alien.strings io.encodings.utf16 io.encodings.utf16n
|
||||
continuations byte-arrays game-input.dinput.keys-array
|
||||
game-input ui.backend.windows ;
|
||||
math.rectangles accessors math alien alien.strings
|
||||
io.encodings.utf16 io.encodings.utf16n continuations
|
||||
byte-arrays game-input.dinput.keys-array game-input
|
||||
ui.backend.windows windows.errors ;
|
||||
IN: game-input.dinput
|
||||
|
||||
SINGLETON: dinput-game-input-backend
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
USING: alien alien.c-types alien.strings
|
||||
kernel libc math namespaces system-info.backend
|
||||
system-info.windows windows windows.advapi32
|
||||
windows.kernel32 system byte-arrays ;
|
||||
windows.kernel32 system byte-arrays windows.errors ;
|
||||
IN: system-info.windows.nt
|
||||
|
||||
M: winnt cpus ( -- n )
|
||||
|
@ -41,6 +41,6 @@ M: winnt available-virtual-mem ( -- n )
|
|||
GetComputerName win32-error=0/f alien>native-string ;
|
||||
|
||||
: username ( -- string )
|
||||
UNLEN 1+
|
||||
UNLEN 1 +
|
||||
[ <byte-array> dup ] keep <uint>
|
||||
GetUserName win32-error=0/f alien>native-string ;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
USING: alien alien.c-types kernel libc math namespaces
|
||||
windows windows.kernel32 windows.advapi32
|
||||
words combinators vocabs.loader system-info.backend
|
||||
system alien.strings ;
|
||||
system alien.strings windows.errors ;
|
||||
IN: system-info.windows
|
||||
|
||||
: system-info ( -- SYSTEM_INFO )
|
||||
|
|
Loading…
Reference in New Issue