?
Solved

how to store / retrieve IntPtr from registry ?

Posted on 2004-03-31
2
Medium Priority
?
323 Views
Last Modified: 2006-11-17
using C#, i am storing the number as a string (i believe), when i try to read it and cast to IntPtr i get an exception.
any ideas ?
0
Comment
Question by:Shay050799
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 48

Expert Comment

by:AlexFM
ID: 10730238
Please show your code.
0
 
LVL 20

Accepted Solution

by:
TheAvenger earned 200 total points
ID: 10730827
You should not cast it, but first convert it to int. Like this:

string strVal = GetValueFromString();

int iVal = Int32.Parse (strVal);
IntPtr ptr = (IntPtr)iVal;
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

765 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