venta: (Default)
[personal profile] venta
Does anyone know anything about .NET ?

I'm writing a .NET app (Managed C++) which manipulates registry keys. Which is fine.

You call GetValue on the subkey, passing in the name of the value you want to retrieve. The returned object is of type Sytem::Object, but you can cast it to an int or a string (depending on type) and all is well.

Except... what if your registry value is binary ? Then you can't cast it to an integer (it throws an exception, not unreasonably, presumably as it can't guarantee value is small enough to fit into an int). You are, in fact, left with a System::Object which is round, and smooth, and shiny and has absolutely no means of accessing the value contained therein.

At least, no means that I can determine. Just how do I persuade the binary value out of it ?

Date: 2008-04-03 04:24 pm (UTC)
From: [identity profile] venta.livejournal.com
Not that I've noticed... could you be a bit more specific ? Me and MSDN don't get on well, and I have immense difficulty extracting any information from it at all.

Profile

venta: (Default)
venta

December 2025

S M T W T F S
 123456
78910111213
14151617181920
212223 24252627
28293031   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Dec. 27th, 2025 02:33 pm
Powered by Dreamwidth Studios