[REACTOS] Fix misc 64 bit issues

This commit is contained in:
Timo Kreuzer 2019-04-01 14:24:05 +02:00
parent d2feba3d53
commit f9a967b2ae
3 changed files with 26 additions and 24 deletions

View file

@ -172,8 +172,8 @@ UCHAR DriveMapGetBiosDriveNumber(PCSTR DeviceName)
VOID DriveMapInstallInt13Handler(PDRIVE_MAP_LIST DriveMap) VOID DriveMapInstallInt13Handler(PDRIVE_MAP_LIST DriveMap)
{ {
ULONG* RealModeIVT = (ULONG*)0x00000000; ULONG* RealModeIVT = (ULONG*)UlongToPtr(0x00000000);
USHORT* BiosLowMemorySize = (USHORT*)0x00000413; USHORT* BiosLowMemorySize = (USHORT*)ULongToPtr(0x00000413);
if (!DriveMapInstalled) if (!DriveMapInstalled)
{ {
@ -197,7 +197,9 @@ VOID DriveMapInstallInt13Handler(PDRIVE_MAP_LIST DriveMap)
DriveMapOldInt13HandlerAddress = OldInt13HandlerAddress; DriveMapOldInt13HandlerAddress = OldInt13HandlerAddress;
// Copy the code to our reserved area // Copy the code to our reserved area
RtlCopyMemory((PVOID)DriveMapHandlerAddress, &DriveMapInt13HandlerStart, ((ULONG)&DriveMapInt13HandlerEnd - (ULONG)&DriveMapInt13HandlerStart)); RtlCopyMemory(UlongToPtr(DriveMapHandlerAddress),
&DriveMapInt13HandlerStart,
((PUCHAR)&DriveMapInt13HandlerEnd - (PUCHAR)&DriveMapInt13HandlerStart));
// Update the IVT // Update the IVT
RealModeIVT[0x13] = DriveMapHandlerSegOff; RealModeIVT[0x13] = DriveMapHandlerSegOff;

View file

@ -109,8 +109,8 @@ DWORD WINAPI AllocateAndGetIfTableFromStack(PMIB_IFTABLE *ppIfTable,
{ {
DWORD ret; DWORD ret;
TRACE("ppIfTable %p, bOrder %ld, heap 0x%08lx, flags 0x%08lx\n", ppIfTable, TRACE("ppIfTable %p, bOrder %ld, heap 0x%p, flags 0x%08lx\n", ppIfTable,
(DWORD)bOrder, (DWORD)heap, flags); (DWORD)bOrder, heap, flags);
if (!ppIfTable) if (!ppIfTable)
ret = ERROR_INVALID_PARAMETER; ret = ERROR_INVALID_PARAMETER;
else { else {
@ -153,8 +153,8 @@ DWORD WINAPI AllocateAndGetIpAddrTableFromStack(PMIB_IPADDRTABLE *ppIpAddrTable,
{ {
DWORD ret; DWORD ret;
TRACE("ppIpAddrTable %p, bOrder %ld, heap 0x%08lx, flags 0x%08lx\n", TRACE("ppIpAddrTable %p, bOrder %ld, heap 0x%p, flags 0x%08lx\n",
ppIpAddrTable, (DWORD)bOrder, (DWORD)heap, flags); ppIpAddrTable, (DWORD)bOrder, heap, flags);
if (!ppIpAddrTable) if (!ppIpAddrTable)
ret = ERROR_INVALID_PARAMETER; ret = ERROR_INVALID_PARAMETER;
else { else {
@ -195,8 +195,8 @@ DWORD WINAPI AllocateAndGetIpForwardTableFromStack(PMIB_IPFORWARDTABLE *
{ {
DWORD ret; DWORD ret;
TRACE("ppIpForwardTable %p, bOrder %ld, heap 0x%08lx, flags 0x%08lx\n", TRACE("ppIpForwardTable %p, bOrder %ld, heap 0x%p, flags 0x%08lx\n",
ppIpForwardTable, (DWORD)bOrder, (DWORD)heap, flags); ppIpForwardTable, (DWORD)bOrder, heap, flags);
if (!ppIpForwardTable) if (!ppIpForwardTable)
ret = ERROR_INVALID_PARAMETER; ret = ERROR_INVALID_PARAMETER;
else { else {
@ -239,8 +239,8 @@ DWORD WINAPI AllocateAndGetIpNetTableFromStack(PMIB_IPNETTABLE *ppIpNetTable,
{ {
DWORD ret; DWORD ret;
TRACE("ppIpNetTable %p, bOrder %ld, heap 0x%08lx, flags 0x%08lx\n", TRACE("ppIpNetTable %p, bOrder %ld, heap 0x%p, flags 0x%08lx\n",
ppIpNetTable, (DWORD)bOrder, (DWORD)heap, flags); ppIpNetTable, (DWORD)bOrder, heap, flags);
if (!ppIpNetTable) if (!ppIpNetTable)
ret = ERROR_INVALID_PARAMETER; ret = ERROR_INVALID_PARAMETER;
else { else {
@ -283,8 +283,8 @@ DWORD WINAPI AllocateAndGetTcpTableFromStack(PMIB_TCPTABLE *ppTcpTable,
{ {
DWORD ret; DWORD ret;
TRACE("ppTcpTable %p, bOrder %ld, heap 0x%08lx, flags 0x%08lx\n", TRACE("ppTcpTable %p, bOrder %ld, heap 0x%p, flags 0x%08lx\n",
ppTcpTable, (DWORD)bOrder, (DWORD)heap, flags); ppTcpTable, (DWORD)bOrder, heap, flags);
if (!ppTcpTable) if (!ppTcpTable)
ret = ERROR_INVALID_PARAMETER; ret = ERROR_INVALID_PARAMETER;
else { else {
@ -328,8 +328,8 @@ DWORD WINAPI AllocateAndGetTcpExTableFromStack(PVOID *ppTcpTable,
{ {
DWORD ret; DWORD ret;
TRACE("ppTcpTable %p, bOrder %ld, heap 0x%08lx, flags 0x%08lx, family 0x%08lx\n", TRACE("ppTcpTable %p, bOrder %ld, heap 0x%p, flags 0x%08lx, family 0x%08lx\n",
ppTcpTable, (DWORD)bOrder, (DWORD)heap, flags, family); ppTcpTable, (DWORD)bOrder, heap, flags, family);
if (!ppTcpTable) if (!ppTcpTable)
ret = ERROR_INVALID_PARAMETER; ret = ERROR_INVALID_PARAMETER;
else { else {
@ -374,8 +374,8 @@ DWORD WINAPI AllocateAndGetTcpExTable2FromStack(PVOID *ppTcpTable,
{ {
DWORD ret; DWORD ret;
TRACE("ppTcpTable %p, bOrder %ld, heap 0x%08lx, flags 0x%08lx, family %ld, class %ld\n", TRACE("ppTcpTable %p, bOrder %ld, heap 0x%p, flags 0x%08lx, family %ld, class %ld\n",
ppTcpTable, (DWORD)bOrder, (DWORD)heap, flags, family, class); ppTcpTable, (DWORD)bOrder, heap, flags, family, class);
if (!ppTcpTable) if (!ppTcpTable)
ret = ERROR_INVALID_PARAMETER; ret = ERROR_INVALID_PARAMETER;
else { else {
@ -418,8 +418,8 @@ DWORD WINAPI AllocateAndGetUdpTableFromStack(PMIB_UDPTABLE *ppUdpTable,
{ {
DWORD ret; DWORD ret;
TRACE("ppUdpTable %p, bOrder %ld, heap 0x%08lx, flags 0x%08lx\n", TRACE("ppUdpTable %p, bOrder %ld, heap 0x%p, flags 0x%08lx\n",
ppUdpTable, (DWORD)bOrder, (DWORD)heap, flags); ppUdpTable, (DWORD)bOrder, heap, flags);
if (!ppUdpTable) if (!ppUdpTable)
ret = ERROR_INVALID_PARAMETER; ret = ERROR_INVALID_PARAMETER;
else { else {
@ -463,8 +463,8 @@ DWORD WINAPI AllocateAndGetUdpExTableFromStack(PVOID *ppUdpTable,
{ {
DWORD ret; DWORD ret;
TRACE("ppUdpTable %p, bOrder %ld, heap 0x%08lx, flags 0x%08lx, family 0x%08lx\n", TRACE("ppUdpTable %p, bOrder %ld, heap 0x%p, flags 0x%08lx, family 0x%08lx\n",
ppUdpTable, (DWORD)bOrder, (DWORD)heap, flags, family); ppUdpTable, (DWORD)bOrder, heap, flags, family);
if (!ppUdpTable) if (!ppUdpTable)
ret = ERROR_INVALID_PARAMETER; ret = ERROR_INVALID_PARAMETER;
else { else {
@ -509,8 +509,8 @@ DWORD WINAPI AllocateAndGetUdpExTable2FromStack(PVOID *ppUdpTable,
{ {
DWORD ret; DWORD ret;
TRACE("ppUdpTable %p, bOrder %ld, heap 0x%08lx, flags 0x%08lx, family %ld, class %ld\n", TRACE("ppUdpTable %p, bOrder %ld, heap 0x%p, flags 0x%08lx, family %ld, class %ld\n",
ppUdpTable, (DWORD)bOrder, (DWORD)heap, flags, family, class); ppUdpTable, (DWORD)bOrder, heap, flags, family, class);
if (!ppUdpTable) if (!ppUdpTable)
ret = ERROR_INVALID_PARAMETER; ret = ERROR_INVALID_PARAMETER;
else { else {

View file

@ -106,7 +106,7 @@ static LPITEMIDLIST _ILReadFromSharedMemory(PCWSTR strField)
if (*strField != L':') if (*strField != L':')
return NULL; return NULL;
HANDLE hData = (HANDLE) StrToIntW(strField + 1); HANDLE hData = UlongToHandle(StrToIntW(strField + 1));
PWSTR strSecond = StrChrW(strField + 1, L':'); PWSTR strSecond = StrChrW(strField + 1, L':');
if (strSecond) if (strSecond)