NO

Author Topic: From 32 bit to 64bit  (Read 231 times)

Offline bitcoin

  • Member
  • *
  • Posts: 95
From 32 bit to 64bit
« on: June 22, 2020, 10:56:44 pm »
Hello
i try to re-write my program to work in native 64bit.

Many errors with memory access, because many code such as
Code: [Select]
functionAddres = (DWORD)GetProcAddress(curDllModule, pFunction);In 64bit address may be greater then DWORD value.. Can I change all pointers to DWORD_PTR ? Or I must use ULONG?

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2064
    • http://www.smorgasbordet.com
Re: From 32 bit to 64bit
« Reply #1 on: June 22, 2020, 11:15:57 pm »
DWORD_PTR should work fine. Also works with ULONG_PTR. ULONG is same as DWORD, so not much help there...
/Pelle

Offline bitcoin

  • Member
  • *
  • Posts: 95
Re: From 32 bit to 64bit
« Reply #2 on: June 23, 2020, 03:52:03 pm »
Thank you Pelle.

DWORD64 is equ DWORD_PTR in 64bit? Or this is different data types?

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2064
    • http://www.smorgasbordet.com
Re: From 32 bit to 64bit
« Reply #3 on: June 23, 2020, 08:37:55 pm »
DWORD64 is equ DWORD_PTR in 64bit? Or this is different data types?
It's effectively the same thing. Using DWORD_PTR for an address type is *maybe* more informative, but who knows...?

EDIT: see https://docs.microsoft.com/en-us/windows/win32/winprog/windows-data-types
« Last Edit: June 23, 2020, 09:51:36 pm by Pelle »
/Pelle