If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Delphi, C etc > Pb loading a .reg to the registry with VC++

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-02-04, 05:21
mickee mickee is offline
Registered User
 
Join Date: Nov 2003
Posts: 8
Pb loading a .reg to the registry with VC++

Hello,
I'm not very familiar in c++....
I have pb trying to load a .reg file in the registry.
I'm working under XP but the pb should work on NT....

I've used the fonction RegLoadKey :

<code>
char * fileName = "C:\\myRegFile.reg";
HKEY hKey;

error_succes = RegLoadKey(HKEY_LOCAL_MACHINE, "SOFTWARE", fileName);
if(error_succes == ERROR_SUCCESS) {
AfxMessageBox("File imported", MB_YESNO);
} else {
AfxMessageBox("Error during the import...", MB_YESNO);
}
</code>

I get an error code 1314 (A required privilege is not held by the client), how can i set the right priviledge to run my program ?

thanks.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On