Link to home
Start Free TrialLog in
Avatar of lilach
lilach

asked on

RegSaveKey fails

Under NT 4.0,Visual c++ 4.1.
RegSaveKey always fails (given a valid handle, path for file that doesn't exist, and NULL for security attrib.)
I need: a possible explanation + a working source code example using the RegSaveKey and its compliant RegRestoreKey.
TIA.
Lilach
Avatar of lilach
lilach

ASKER

Edited text of question
Be sure that you pass valid directory for file that doesn't exist. For example you pass "c:\dir1\subdir1\file.reg" but there is no "subdir1" subdirectory in "c:\dir1" or there is no "dir1" directory on "c:" drive. "RegSaveKey" function can't create new directory.
Avatar of lilach

ASKER

1.OfCourse the directory exists.
2.I asked for a working source code..
 
Avatar of lilach

ASKER

I checked under win95 ,and it works.

ASKER CERTIFIED SOLUTION
Avatar of pcs071997
pcs071997

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial