winregistry.h

Go to the documentation of this file.
00001 
00002 /*  $Id: winregistry.h 355 2005-01-11 22:48:55Z andreradke $    */
00003 
00004 /******************************************************************************
00005 
00006     UserLand Frontier(tm) -- High performance Web content management,
00007     object database, system-level and Internet scripting environment,
00008     including source code editing and debugging.
00009 
00010     Copyright (C) 1992-2004 UserLand Software, Inc.
00011 
00012     This program is free software; you can redistribute it and/or modify
00013     it under the terms of the GNU General Public License as published by
00014     the Free Software Foundation; either version 2 of the License, or
00015     (at your option) any later version.
00016 
00017     This program is distributed in the hope that it will be useful,
00018     but WITHOUT ANY WARRANTY; without even the implied warranty of
00019     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020     GNU General Public License for more details.
00021 
00022     You should have received a copy of the GNU General Public License
00023     along with this program; if not, write to the Free Software
00024     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00025 
00026 ******************************************************************************/
00027 
00028 /* Frontier Windows Registry defines */
00029 
00030 
00031 #include "lang.h"
00032 
00033 #ifdef REG_RESOURCE_LIST
00034     #define regtype_none                        ( REG_NONE )   // No value type
00035     #define regtype_string                      ( REG_SZ )   // Unicode nul terminated string
00036     #define regtype_expand_string               ( REG_EXPAND_SZ )   // Unicode nul terminated string
00037                                                         // (with environment variable references)
00038     #define regtype_binary                      ( REG_BINARY )   // Free form binary
00039     #define regtype_ulong                       ( REG_DWORD )   // 32-bit number
00040     #define regtype_ulong_little_endian         ( REG_DWORD_LITTLE_ENDIAN )   // 32-bit number (same as REG_DWORD)
00041     #define regtype_ulong_big_endian            ( REG_DWORD_BIG_ENDIAN )   // 32-bit number
00042     #define regtype_link                        ( REG_LINK )   // Symbolic Link (unicode)
00043     #define regtype_unicode                     ( REG_MULTI_SZ )   // Multiple Unicode strings
00044     #define regtype_resource_list               ( REG_RESOURCE_LIST )   // Resource list in the resource map
00045     #define regtype_full_resource_descriptor    ( REG_FULL_RESOURCE_DESCRIPTOR )  // Resource list in the hardware description
00046     #define regtype_resource_requirements_list  ( REG_RESOURCE_REQUIREMENTS_LIST )
00047 
00048 #else
00049 
00050     #define regtype_none                        ( 0 )   // No value type
00051     #define regtype_string                      ( 1 )   // Unicode nul terminated string
00052     #define regtype_expand_string               ( 2 )   // Unicode nul terminated string
00053                                                         // (with environment variable references)
00054     #define regtype_binary                      ( 3 )   // Free form binary
00055     #define regtype_ulong                       ( 4 )   // 32-bit number
00056     #define regtype_ulong_little_endian         ( 4 )   // 32-bit number (same as REG_DWORD)
00057     #define regtype_ulong_big_endian            ( 5 )   // 32-bit number
00058     #define regtype_link                        ( 6 )   // Symbolic Link (unicode)
00059     #define regtype_unicode                     ( 7 )   // Multiple Unicode strings
00060     #define regtype_resource_list               ( 8 )   // Resource list in the resource map
00061     #define regtype_full_resource_descriptor    ( 9 )  // Resource list in the hardware description
00062     #define regtype_resource_requirements_list  ( 10 )
00063 #endif
00064 
00065 #define STR_P_HKCU_SHORT    "\x04" "HKCU"
00066 #define STR_P_HKCU_LONG     "\x11" "HKEY_CURRENT_USER"
00067 #define STR_P_HKLM_SHORT    "\x04" "HKLM"
00068 #define STR_P_HKLM_LONG     "\x12" "HKEY_LOCAL_MACHINE"
00069 #define STR_P_HKCR_SHORT    "\x04" "HKCR"
00070 #define STR_P_HKCR_LONG     "\x11" "HKEY_CURRENT_USER"
00071 #define STR_P_HKU_SHORT     "\x03" "HKU"
00072 #define STR_P_HKU_LONG      "\x0a" "HKEY_USERS"
00073 #define STR_P_HKCC_SHORT    "\x04" "HKCC"
00074 #define STR_P_HCC_LONG      "\x13" "HKEY_CURRENT_CONFIG"
00075 
00076 #define STR_P_REG_BINARY                "\x0a" "REG_BINARY"
00077 #define STR_P_REG_DWORD                 "\x09" "REG_DWORD"
00078 #define STR_P_REG_DWORD_LITTLE_ENDIAN   "\x13" "DWORD_LITTLE_ENDIAN"
00079 #define STR_P_REG_DWORD_BIG_ENDIAN      "\x10" "DWORD_BIG_ENDIAN"
00080 #define STR_P_REG_EXPAND_SZ             "\x09" "EXPAND_SZ"
00081 #define STR_P_REG_LINK                  "\x08" "REG_LINK"
00082 #define STR_P_REG_MULTI_SZ              "\x0c" "REG_MULTI_SZ"
00083 #define STR_P_REG_NONE                  "\x08" "REG_NONE"
00084 #define STR_P_REG_QWORD                 "\x09" "REG_QWORD"
00085 #define STR_P_REG_QWORD_LITTLE_ENDIAN   "\x13" "QWORD_LITTLE_ENDIAN"
00086 #define STR_P_REG_RESOURCE_LIST         "\x11" "REG_RESOURCE_LIST"
00087 #define STR_P_REG_SZ                    "\x06" "REG_SZ"
00088 #define STR_P_UNKNOWNTYPE               "\x07" "UNKNOWN"    
00089 
00090 /* Frontier Windows Registry functions */
00091 
00092 /* This function is a single line registration of the extension, its content type, its filetype and its description
00093 and the default icon and shell open command needed.  
00094 
00095   extension - is the .extension to register - must specify and will be a key in HKEY_CLASSES_ROOT
00096   filetype - this is the name of the other key in HKEY_CLASSES_ROOT and the defualt value of the extensions key - must be specified 
00097   contenttype - this is optional - if specified will value of the value "Content Type" for the extensions key
00098   filedescription - this is optional - if not specified the function will not create the filetype key also 
00099                     iconfile, iconid, & shellopen are ignored.  If it is specified the filetype key is created with
00100                     the default value set to this filedescription.
00101   iconfile - this is optional and only used if filedescription is specified.  If specified is the filename that contians
00102                     the icon for this filetype.  a DefaultIcon subkey will be created and its value will be set to this
00103                     value followed be a comma and the value of iconid. 
00104   iconid - optional - see above
00105   shellopen - optional - if specified creates a shell - open - command subkey and sets its value to this parameter.
00106 */
00107 
00108 boolean registerFileType (bigstring extension, bigstring filetype, bigstring contenttype, bigstring filedescription, bigstring iconfile, short iconid, bigstring shellopen);
00109 
00110 
00111 boolean setRegKeyString (Handle regkey, bigstring subkey, bigstring itemname, bigstring bsval);
00112 
00113 boolean setRegKeyLong (Handle regkey, bigstring subkey, bigstring itemname, unsigned long val);
00114 
00115 boolean setRegKeyBinary (Handle regkey, bigstring subkey, bigstring itemname, unsigned char * val, unsigned long len);
00116 
00117 boolean getRegKeyInfo (Handle regkey, bigstring subkey, bigstring itemname, unsigned long *regType, unsigned long * len);
00118 
00119 boolean getRegKeyString (Handle regkey, bigstring subkey, bigstring itemname, bigstring bsval);
00120 
00121 boolean getRegKeyLong (Handle regkey, bigstring subkey, bigstring itemname, unsigned long * val);
00122 
00123 boolean getRegKeyBinary (Handle regkey, bigstring subkey, bigstring itemname, unsigned char * val, unsigned long  * len);
00124 
00125 boolean setProfileString (bigstring itemname, bigstring bsval);
00126 
00127 boolean setProfileLong (bigstring itemname, unsigned long val);
00128 
00129 boolean setProfileData (bigstring itemname, unsigned char * val, unsigned long len);
00130 
00131 boolean getProfileString (bigstring itemname, bigstring bsval);
00132 
00133 boolean getProfileLong (bigstring itemname, unsigned long * val);
00134 
00135 boolean getProfileData (bigstring itemname, unsigned char * val, unsigned long * len);
00136 
00137 extern boolean winreggettype (Handle h, bigstring bstype); /*7.0.2b1 Radio PBS*/
00138 
00139 extern boolean winregread (Handle h, tyvaluerecord *v);
00140 
00141 extern boolean winregdelete (Handle h);
00142 
00143 extern boolean winregwrite (Handle h, tyvaluerecord *val, bigstring bstype);

Generated on Wed May 31 18:20:04 2006 for frontierkernel 10.1.10a by  doxygen 1.4.6