Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!



jjbjjb Member Posts: 35
when using the regsavekey i can get it to save the file, but it saves the file under a different name to what i specify, what is it doing when it does this, why does it do this, and how can i change it so it saves the name that i put in the parameter LPCTSTR lpFile and not its own name.


  • goodbettgoodbett Member Posts: 6
    LONG RegSaveKey(
    HKEY hKey, // handle to key
    LPCTSTR lpFile, // data file
    LPSECURITY_ATTRIBUTES lpSecurityAttributes // SD
    above is the prototype of fucntion RegSaveKey.There are some difference between different operating systems about the second argument lpFile.
    Windows 95/98/Me: RegSaveKey does not support long file names. To save a registry hive to a file with a long file name, first save the hive to a short file name, then rename the resulting file to its long file name.

    Windows NT/2000/XP: If the string does not include a path, the file is created in the current directory of the calling process for a local key, or in the %systemroot%system32 directory for a remote key.

    Windows 95/98/Me: If the string does not include a path, the file is created in the Windows root directory for local and remote keys. See GetWindowsDirectory.

  • jjbjjb Member Posts: 35
    if for example i do;
    regsavekey(hKey, "A:\fff", NULL) why does it save it as BBODGDJ

    if its a case that i need to rename it manually once it is save is there a function to do this.
  • goodbettgoodbett Member Posts: 6
    try to modify your code as follow
    regsavekey(hKey, "A:fff", NULL)
  • jjbjjb Member Posts: 35
    that compiles with a warning of unrecognised character sequence

Sign In or Register to comment.