* syscalls.cc (gethostid): Add lpFreeBytesAvailable argument to
GetDiskFreeSpaceEx call since NT4 requires it.
This commit is contained in:
parent
cb16ce2c2e
commit
f7f542063b
|
@ -1,3 +1,8 @@
|
||||||
|
2003-09-16 Brian Ford <ford@vss.fsi.com>
|
||||||
|
|
||||||
|
* syscalls.cc (gethostid): Add lpFreeBytesAvailable argument to
|
||||||
|
GetDiskFreeSpaceEx call since NT4 requires it.
|
||||||
|
|
||||||
2003-09-16 Christopher Faylor <cgf@redhat.com>
|
2003-09-16 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
* fhandler_process.cc (fhandler_process::fill_filebuf): Open pinfo with
|
* fhandler_process.cc (fhandler_process::fill_filebuf): Open pinfo with
|
||||||
|
|
|
@ -2884,7 +2884,10 @@ long gethostid(void)
|
||||||
key.get_string ("ProductId", (char *)&data[6], 24, "00000-000-0000000-00000");
|
key.get_string ("ProductId", (char *)&data[6], 24, "00000-000-0000000-00000");
|
||||||
debug_printf ("Windows Product ID: %s", (char *)&data[6]);
|
debug_printf ("Windows Product ID: %s", (char *)&data[6]);
|
||||||
|
|
||||||
GetDiskFreeSpaceEx ("C:\\", NULL, (PULARGE_INTEGER) &data[11], NULL);
|
/* Contrary to MSDN, NT4 requires the second argument
|
||||||
|
or a STATUS_ACCESS_VIOLATION is generated */
|
||||||
|
ULARGE_INTEGER availb;
|
||||||
|
GetDiskFreeSpaceEx ("C:\\", &availb, (PULARGE_INTEGER) &data[11], NULL);
|
||||||
if (GetLastError () == ERROR_PROC_NOT_FOUND)
|
if (GetLastError () == ERROR_PROC_NOT_FOUND)
|
||||||
GetDiskFreeSpace ("C:\\", NULL, NULL, NULL, (DWORD *)&data[11]);
|
GetDiskFreeSpace ("C:\\", NULL, NULL, NULL, (DWORD *)&data[11]);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue