|
-
April 29th, 1999, 11:26 AM
#1
Registry Editing--problem
Hi,
Environment : vc+=5.0 and winNT,
I want to write from my application in to the registry. I tried using WriteProfile String and this is writing in to Win.ini file and Win NT registry
is not getting updated.
Please let me know how to solve this problem.
Thanx in advance.
-
April 29th, 1999, 12:03 PM
#2
Re: Registry Editing--problem
Hi,
The function you used is updating the ini. For registry there are set of function available. For eg. there is one function to set the value of particular key, SetRegistryKey().
try this ou.
-
April 29th, 1999, 01:02 PM
#3
Re: Registry Editing--problem
Hi
The problem is I want use Win32 API to do this more over WriteProfileString() takes section name and key name as args.I think this should also work.
Bye.
-
April 29th, 1999, 03:38 PM
#4
Re: Registry Editing--problem
Hi,
You can direcly write in to registry?
-
April 29th, 1999, 04:57 PM
#5
Re: Registry Editing--problem
I want to upadte the registry only from my application and not directly.
-
April 29th, 1999, 09:49 PM
#6
Re: Registry Editing--problem
The WritePrivateProfileInt & WriteProfileInt (& corresponding string functions) were for Win16 systems and are designed to write to the ini file. In Win NT, these functions can reference the registry depending on system configuration. The best bet is to use the actual Registry API. Here is one to start with:
LONG RegSetValueEx(
HKEY hKey, // handle to key to set value for
LPCTSTR lpValueName, // name of the value to set
DWORD Reserved, // reserved
DWORD dwType, // flag for value type
CONST BYTE *lpData, // address of value data
DWORD cbData // size of value data
);
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|