Skip to content

Commit dbcf6e9

Browse files
committed
os: fix Process on windows
1 parent c149848 commit dbcf6e9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

vlib/os/process_windows.c.v

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ import strings
44

55
fn C.GenerateConsoleCtrlEvent(event u32, pgid u32) bool
66
fn C.GetModuleHandleA(name &char) HMODULE
7-
fn C.GetProcAddress(handle voidptr, procname &byte) voidptr
7+
fn C.GetProcAddress(handle voidptr, procname &u8) voidptr
88
fn C.TerminateProcess(process HANDLE, exit_code u32) bool
99
fn C.PeekNamedPipe(hNamedPipe voidptr, lpBuffer voidptr, nBufferSize int, lpBytesRead voidptr, lpTotalBytesAvail voidptr, lpBytesLeftThisMessage voidptr) bool
1010

1111
type FN_NTSuspendResume = fn (voidptr)
1212

13-
fn ntdll_fn(name &char) FN_NTSuspendResume {
13+
fn ntdll_fn(name &byte) FN_NTSuspendResume {
1414
ntdll := C.GetModuleHandleA(c'NTDLL')
1515
if ntdll == 0 {
1616
return FN_NTSuspendResume(0)
@@ -47,7 +47,7 @@ fn close_valid_handle(p voidptr) {
4747
pub struct WProcess {
4848
pub mut:
4949
proc_info ProcessInformation
50-
command_line [65536]byte
50+
command_line [65536]u8
5151
child_stdin &u32
5252
//
5353
child_stdout_read &u32
@@ -198,7 +198,7 @@ fn (mut p Process) win_read_string(idx int, maxbytes int) (string, int) {
198198
}
199199

200200
mut bytes_read := int(0)
201-
buf := []byte{len: bytes_avail + 300}
201+
buf := []u8{len: bytes_avail + 300}
202202
unsafe {
203203
C.ReadFile(rhandle, &buf[0], buf.cap, voidptr(&bytes_read), 0)
204204
}
@@ -221,7 +221,7 @@ fn (mut p Process) win_slurp(idx int) string {
221221
return ''
222222
}
223223
mut bytes_read := u32(0)
224-
buf := [4096]byte{}
224+
buf := [4096]u8{}
225225
mut read_data := strings.new_builder(1024)
226226
for {
227227
mut result := false

0 commit comments

Comments
 (0)