• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 867
  • Last Modified:

How do i convert char * to DWORD_PTR

hi,

How do i convert char * to DWORD_PTR or DWORD
0
jyotishb
Asked:
jyotishb
1 Solution
 
AlexFMCommented:
Just use simple casting:

char* p;
...

DWORD_PTR ptr = (DWORD_PTR)p;
DWORD dw = (DWORD)p;

Or C++ casting:

DWORD_PTR ptr = static_cast<DWORD_PTR>(p);
DWORD dw = static_cast<DWORD>(p);
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now