CeRegistry OpenNetCF

R

Ruben

Hi boys.... i´m working with a great framework named OpenNetCF, and when i
try to look for a registry value from my desktop app ( my device isPPC WM5,
ActiveSync), all time i get this error:
{"Error retrieving registry properties"}...i tried with and emulator, and i
get the same error... i´ll copy my code:

I´m using OpenNETCF.Desktop.Communication from my desktop app.
string subKey = @"\MUI";

CERegistryKey registryKey = CERegistry.LocalMachine.OpenSubKey(subKey);

string myvalue= (string)registryKey.GetValue("Enable");

Any suggestions ?

Thanks a lot.
 
P

Paul G. Tobey [eMVP]

I'd suggest that the value isn't there, but you haven't told us what part of
this code is generating the error or whether you've verified the presence of
the value/key/whatever with Remote Registry Editor.

Paul T.
 
C

Chris Tacke, eMVP

And "Enable" is a REG_SZ key, not a REG_DWORD? You've initialized RAPI and
connected before getting to this point in your code?


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com
 
R

Ruben

Yes i verified the presence of teh key with w remote registry editor.

The problem is here:

CERegistryKey registryKey = CERegistry.LocalMachine.OpenSubKey(subKey);

after the execution of that line of code, registryKey is null, and when i
look into i see the error: {"Error retrieving registry properties"}

I initialized without problems RAPI, and i was trying to look for another
subkeym and i get the same error....

Any suggestion ?

thanks in advance
 
C

Chris Tacke, eMVP

Can you view the registry info with the Remote Registry Viewer? I'm
wondering if it's a configuration/provisioning problem and it's simply
locked down.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com
 
R

Ruben

Yes, i can see the registry info with a Remote Registry Viewer... The
security setting is OFF.
 
P

Paul G. Tobey [eMVP]

I've just verified that the same code, suitably surrounded with the creation
of a RAPI object, a call to Connect() and, after the registry stuff is done,
a call to Disconnect(), works fine. If you're doing that properly and it
still doesn't work, it almost has to be some security thing...

Paul T.
 

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