Solved

how to store / retrieve IntPtr from registry ?

Posted on 2004-03-31
2
316 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 50 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
What are the simplest ways to create a Merge Sort? 3 37
c# DateTime Format validation 4 68
ASP.NET - Why is accordion not working? 3 49
C# XML Get Values 4 35
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
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…
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…

733 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