Solved

how to store / retrieve IntPtr from registry ?

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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

758 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

22 Experts available now in Live!

Get 1:1 Help Now