How to read/write registry values?

  • Thread starter Richard Lewis Haggard
  • Start date
R

Richard Lewis Haggard

I wanted to save some information in the registry but was stymied. The
C#.NET documentation says to use a number of Win32 functions like
RegistryKey, etc., none of which seem to be supported in the CF world. Is it
possible to read and write to the registry and, if so, what are the
assemblies that must be attached to the project, what namespaces are to be
used and what are the function calls?
========
Richard Lewis Haggard
 
J

Jon Skeet [C# MVP]

I wanted to save some information in the registry but was stymied. The
C#.NET documentation says to use a number of Win32 functions like
RegistryKey, etc., none of which seem to be supported in the CF world. Is it
possible to read and write to the registry and, if so, what are the
assemblies that must be attached to the project, what namespaces are to be
used and what are the function calls?

You'll need to either use P/Invoke, or use the OpenNETCF library (or
something similar).

See http://www.opennetcf.org/library
 
R

Richard Lewis Haggard

Why? Is it because there's no registry, no Microsoft blessed .NET
methodology that exists or some other reason?
=======
Richard Lewis Haggard
 
J

Jon Skeet [C# MVP]

Why? Is it because there's no registry, no Microsoft blessed .NET
methodology that exists or some other reason?

It's just one of the things that the CF framework team presumably
didn't have time to include before release. Using the OpenNETCF library
gives you perfectly good access to it though.
 
C

Chris Tacke, eMVP

You'll find that the Compact Framework is often a little *too* compact and
some things were simply left out. OpenNETCF has tried to fill in those
gaps.

--
Chris Tacke, eMVP
Co-Founder and Advisory Board Member
www.OpenNETCF.org
---
Windows CE Product Manager
Applied Data Systems
www.applieddata.net


Richard Lewis Haggard said:
Why? Is it because there's no registry, no Microsoft blessed .NET
methodology that exists or some other reason?
=======
Richard Lewis Haggard

to
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top