Solved

How do i convert char * to DWORD_PTR

Posted on 2006-11-01
3
812 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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
maxBlock challenge 30 99
if loop in java 3 114
isEverywhere  challenge 19 64
java ^ examples 8 57
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
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.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

743 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now