Changeset 844 for Whitix/trunk/user/system/registry/main.c
- Timestamp:
- 08/08/08 23:17:17 (4 years ago)
- Files:
-
- 1 modified
-
Whitix/trunk/user/system/registry/main.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
Whitix/trunk/user/system/registry/main.c
r839 r844 3 3 #include <file.h> 4 4 5 #include "file.h" 5 6 #include "keyset.h" 7 8 /******************************************************************************* 9 * 10 * FUNCTION: RegLoadApplication 11 * 12 * DESCRIPTION: Loads the registry configuration file for a Whitix application 13 * and mounts it in the registry. 14 * 15 * PARAMETERS: appDir - The path to the directory of the Whitix application. 16 * 17 * RETURNS: Standard Whitix error codes. 18 * 19 ******************************************************************************/ 6 20 7 21 int RegLoadApplication(char* appDir) … … 10 24 struct RegKeySet* mount; 11 25 26 /* 27 * The application's registry file should be located in /Applications/<app>/ 28 * application.reg 29 */ 12 30 strcpy(path, appDir); 13 31 strcat(path, "/application.reg"); 14 32 15 mount=RegKeySetCreate(NULL, appDir); 33 /* Mount the keysets to be read in at /Applications/<app>/, that is, appDir. */ 34 RegKeySetCreate(NULL, appDir); 16 35 36 mount=RegKeySetGet(appDir); 37 38 if (!mount) 39 return -1; 40 41 /* Load the keysets into memory at the mount point. */ 17 42 RegLoadFile(path, mount); 43 44 return 0; 18 45 } 19 46
