[REACTOS] Fix 64 bit issues

This commit is contained in:
Timo Kreuzer 2019-01-06 23:14:09 +01:00
parent 3d3377a5c0
commit f5f6ea2965
5 changed files with 16 additions and 8 deletions

View file

@ -174,7 +174,7 @@ ScServiceMainStubA(LPVOID Context)
/* Set service tag */
Teb = NtCurrentTeb();
Teb->SubProcessTag = (PVOID)ThreadParams->dwServiceTag;
Teb->SubProcessTag = UlongToPtr(ThreadParams->dwServiceTag);
/* Call the main service routine and free the arguments vector */
(ThreadParams->lpServiceMain)(ThreadParams->dwArgCount,
@ -203,7 +203,7 @@ ScServiceMainStubW(LPVOID Context)
/* Set service tag */
Teb = NtCurrentTeb();
Teb->SubProcessTag = (PVOID)ThreadParams->dwServiceTag;
Teb->SubProcessTag = UlongToPtr(ThreadParams->dwServiceTag);
/* Call the main service routine and free the arguments vector */
(ThreadParams->lpServiceMain)(ThreadParams->dwArgCount,
@ -552,7 +552,7 @@ ScControlService(PACTIVE_SERVICE lpService,
TRACE("Service: %S\n", (PWSTR)((ULONG_PTR)ControlPacket + ControlPacket->dwServiceNameOffset));
/* Set service tag */
NtCurrentTeb()->SubProcessTag = (PVOID)lpService->dwServiceTag;
NtCurrentTeb()->SubProcessTag = UlongToPtr(lpService->dwServiceTag);
if (lpService->HandlerFunction)
{

View file

@ -1,9 +1,11 @@
#define typeof(X_) __typeof_ ## X_
#ifdef _WIN64
#define __typeof_uintptr unsigned long long
#define __typeof_intptr long long
#define __typeof_longptr long long
#else
#define __typeof_uintptr unsigned int
#define __typeof_intptr int
#define __typeof_longptr long
#endif
@ -38,7 +40,7 @@ typedef void (__cdecl typeof(jpeg_set_defaults))(struct jpeg_compress_struct *);
typedef unsigned int (__cdecl typeof(jpeg_write_scanlines))(struct jpeg_compress_struct *, char **, unsigned int);
typedef void (*png_error_ptr_1)(struct png_struct_def *, const char *);
typedef void (*png_rw_ptr_1)(struct png_struct_def *, unsigned char *, unsigned int);
typedef void (*png_rw_ptr_1)(struct png_struct_def *, unsigned char *, __typeof_uintptr);
typedef void (*png_flush_ptr_1)(struct png_struct_def *);
typedef struct png_info_def* (__cdecl typeof(png_create_info_struct))(struct png_struct_def *);
typedef struct png_struct_def * (__cdecl typeof(png_create_read_struct))(const char *, void *, png_error_ptr_1, png_error_ptr_1);
@ -80,7 +82,7 @@ typedef void (__cdecl typeof(png_set_PLTE))(struct png_struct_def *, struct png_
typedef void (__cdecl typeof(png_set_tRNS))(struct png_struct_def *, struct png_info_def *, const unsigned char *, int, const struct png_color_16_struct *);
typedef void (__cdecl typeof(png_set_filter))(struct png_struct_def *, int, int);
typedef void *thandle_t_1;
typedef int (*TIFFReadWriteProc_1)(thandle_t_1, void *, __typeof_intptr);
typedef __typeof_intptr (*TIFFReadWriteProc_1)(thandle_t_1, void *, __typeof_intptr);
typedef unsigned int (*TIFFSeekProc_1)(void *, unsigned int, int);
typedef int (*TIFFCloseProc_1)(thandle_t_1);
typedef unsigned int (*TIFFSizeProc_1)(thandle_t_1);

View file

@ -203,7 +203,7 @@ TDI_STATUS InfoTdiQueryGetConnectionTcpTable(PADDRESS_FILE AddrFile,
Size = sizeof(MIB_TCPROW);
}
TcpRow.dwOwningPid = (DWORD)AddrFile->ProcessId;
TcpRow.dwOwningPid = HandleToUlong(AddrFile->ProcessId);
TcpRow.liCreateTimestamp = AddrFile->CreationTime;
if (AddrFile->Listener != NULL)
@ -290,7 +290,7 @@ TDI_STATUS InfoTdiQueryGetConnectionUdpTable(PADDRESS_FILE AddrFile,
UdpRow.dwLocalAddr = AddrFile->Address.Address.IPv4Address;
UdpRow.dwLocalPort = AddrFile->Port;
UdpRow.dwOwningPid = (DWORD)AddrFile->ProcessId;
UdpRow.dwOwningPid = HandleToUlong(AddrFile->ProcessId);
UdpRow.liCreateTimestamp = AddrFile->CreationTime;
UdpRow.dwFlags = 0; /* FIXME */
if (Class == TcpUdpClassOwner)

View file

@ -18,6 +18,12 @@
#ifndef _IMAGEHLP_H
#define _IMAGEHLP_H
#ifdef _WIN64
#ifndef _IMAGEHLP64
#define _IMAGEHLP64
#endif
#endif
#ifdef __cplusplus
extern "C" {
#endif

View file

@ -1231,7 +1231,7 @@ public:
LONG SetStringValue(LPCTSTR pszValueName, LPCTSTR pszValue, DWORD dwType = REG_SZ) throw()
{
ULONG length;
SIZE_T length;
switch (dwType)
{
case REG_SZ: