🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #2010

Re: How can I add this value to the Registry?

#2010
From: Clayton Arends
Date: Wed, 09 May 2007 15:57
25 lines
1666 bytes
> I try this but it won't work

Always provide more information besides "it won't work".  Mention any 
exceptions, compilation errors, etc.

> This add a different value

What value does it add?

You need to show more of your code.  Nobody here knows how 'new_binary' has 
been defined.

However, this should work just fine (not tested):

  char new_binary[9] = { 0, 0, 0, 0, 0x5b, 0xe0, 0, 0, 0x5c };

  TRegistry* reg = new TRegistry(KEY_ALL_ACCESS);
  std::auto_ptr<TRegistry> auto_reg(reg); // RAII
  reg->RootKey = HKEY_LOCAL_MACHINE;
  if (reg->OpenKey("SYSTEM\\CurrentControlSet\\Control", true))
  {
    reg->WriteBinaryData("myMap", new_binary, sizeof(new_binary));
  }

- Clayton 
Technical Details
Message-ID: <4641ef51$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <4641dfd2@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,2ecb07d7658909e7
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Clayton Arends" <nospam_claytonarends@hotmail.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <4641dfd2@newsgroups.borland.com>
Subject: Re: How can I add this value to the Registry?
Date: Wed, 9 May 2007 08:57:06 -0700
Lines: 27
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3028
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 71.93.4.10
Message-ID: <4641ef51$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1178726225 71.93.4.10 (9 May 2007 08:57:05 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail