Article View: borland.public.cppbuilder.nativeapi
Article #8722Re: Getting admistrator priviliges temporarily
From: Remy Lebeau (TeamB)
Date: Wed, 29 Sep 2004 16:54
Date: Wed, 29 Sep 2004 16:54
25 lines
1869 bytes
1869 bytes
"Fatih Ekinci" <fekinci42@ttnet.net.tr> wrote in message
news:415a81cd@newsgroups.borland.com...
> retval = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "Software\\aaa", NULL,
> KEY_WRITE, &key);
Since you are only writing a new value and not creating a subkey, try
KEY_SET_VALUE instead of KEY_WRITE:
retval = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "Software\\aaa", NULL,
KEY_SET_VALUE, &key);
> else MessageBox (NULL, "RegSetValueEx operation failed!", "Registry
> operation", MB_OK);
What is the actual value of retval and GetLastError()?
> else MessageBox (NULL, "RegOpenKeyEx operation failed!", "Registry
> operation", MB_OK);
What is the actual value of retval and GetLastError()?
Gambit
Technical Details
Message-ID:
<415ae8b6$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!colt.net!peernews3.colt.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<41566608@newsgroups.borland.com> <4156a465$1@newsgroups.borland.com> <415880b8@newsgroups.borland.com> <41592480$1@newsgroups.borland.com> <4159c77b@newsgroups.borland.com> <4159c88d$1@newsgroups.borland.com> <415a81cd@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,f4e17b02ce5b6ff3 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <41566608@newsgroups.borland.com> <4156a465$1@newsgroups.borland.com> <415880b8@newsgroups.borland.com> <41592480$1@newsgroups.borland.com> <4159c77b@newsgroups.borland.com> <4159c88d$1@newsgroups.borland.com> <415a81cd@newsgroups.borland.com> Subject: Re: Getting admistrator priviliges temporarily Date: Wed, 29 Sep 2004 09:54:18 -0700 Lines: 27 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 68.69.17.41 Message-ID: <415ae8b6$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1096476854 68.69.17.41 (29 Sep 2004 09:54:14 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!colt.net!peernews3.colt.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail