Solved

How do i convert char * to DWORD_PTR

Posted on 2006-11-01
3
821 Views
Last Modified: 2013-11-20
hi,

How do i convert char * to DWORD_PTR or DWORD
0
Comment
Question by:jyotishb
3 Comments
 
LVL 48

Accepted Solution

by:
AlexFM earned 250 total points
ID: 17855988
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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Show shut-down message as Windows 8 shuts down. 9 101
sumHeights  challenge 17 75
Use of condition with 'serial' in ansible 2 71
Problem to App source 6 75
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question