CVS update: php31/os/nt
| From: | shane | Date: | Wed, 02 Sep 1998 19:18:28 +0000 |
| Subject: | CVS update: php31/os/nt | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-750@lists.php.net to get a copy of this message | ||
Date: Wednesday September 2, 1998 @ 15:18
Author: shane
Update of /repository/php31/os/nt
In directory asf:/u2/tmp/cvs-serv13382/os/nt
Modified Files:
registry.c registry.h
Log Message:
reading ini from registry working now, now to do per-server
Index: php31/os/nt/registry.c
diff -c php31/os/nt/registry.c:1.1 php31/os/nt/registry.c:1.2
*** php31/os/nt/registry.c:1.1 Tue Sep 1 12:58:43 1998
--- php31/os/nt/registry.c Wed Sep 2 15:18:27 1998
***************
*** 3,11 ****
#include "internal_functions.h"
#include "php3_list.h"
#include "registry.h"
-
static struct {
char * name;
HKEY hkey;
--- 3,11 ----
#include "internal_functions.h"
#include "php3_list.h"
#include "registry.h"
+ #include "winutil.h"
static struct {
char * name;
HKEY hkey;
***************
*** 31,49 ****
};
! int _php3_win32_reg_init(INIT_FUNC_ARGS)
{
! TLS_VARS;
! GLOBAL(registry_le_hkey) = register_list_destructors(NULL, NULL);
return SUCCESS;
}
! PHPAPI int _php3_win32_reg_read(char *value_name,BYTE * pbuffer){
int i,found;
char *root, *path, *key_name, *p;
HKEY hkey;
LONG status;
! DWORD dwType, dwBufSize;
/*
* From a path on the form "HKEY_LOCAL_MACHINE\SOFTWARE\GNU\Emacs", extract the
following parts:
--- 31,50 ----
};
! int _php3_win32_reg_init(INLINE_TLS_VOID)
{
! /*called from module startup*/
! GLOBAL(registry_le_hkey) = _register_list_destructors(NULL, NULL, 0);
return SUCCESS;
}
! PHPAPI BYTE *_php3_win32_reg_read(char *value_name,DWORD *dwType){
int i,found;
char *root, *path, *key_name, *p;
HKEY hkey;
LONG status;
! DWORD dwBufSize;
! BYTE *pbuffer;
/*
* From a path on the form "HKEY_LOCAL_MACHINE\SOFTWARE\GNU\Emacs", extract the
following parts:
***************
*** 84,90 ****
}
/* Determine necessary size of buffer */
! status = RegQueryValueEx(hkey, key_name, 0, &dwType, NULL, &dwBufSize);
if (status != ERROR_SUCCESS) {
php3_error(E_WARNING, "Failed to read registry value, Windows error %d", status);
return 0;
--- 85,91 ----
}
/* Determine necessary size of buffer */
! status = RegQueryValueEx(hkey, key_name, 0, dwType, NULL, &dwBufSize);
if (status != ERROR_SUCCESS) {
php3_error(E_WARNING, "Failed to read registry value, Windows error %d", status);
return 0;
***************
*** 93,99 ****
dwBufSize = 1;
pbuffer = emalloc(dwBufSize);
! status = RegQueryValueEx(hkey, key_name, 0, &dwType, pbuffer, &dwBufSize);
RegCloseKey(hkey);
if (status != ERROR_SUCCESS) {
--- 94,100 ----
dwBufSize = 1;
pbuffer = emalloc(dwBufSize);
! status = RegQueryValueEx(hkey, key_name, 0, dwType, pbuffer, &dwBufSize);
RegCloseKey(hkey);
if (status != ERROR_SUCCESS) {
***************
*** 104,118 ****
efree(root);
efree(path);
efree(key_name);
! return dwType;
}
! PHPAPI int _php3_win32_reg_open(char *value_name INLINE_TLS){
char *root, *path;
HKEY hkey;
LONG status;
! RegKey * pRegKey;
int i,found;
/*
* From a path on the form "HKEY_LOCAL_MACHINE\SOFTWARE\GNU", extract the following
parts:
--- 105,120 ----
efree(root);
efree(path);
efree(key_name);
! return pbuffer;
}
! PHPAPI RegKey *_php3_win32_reg_open(char *value_name INLINE_TLS){
char *root, *path;
HKEY hkey;
LONG status;
! RegKey *pRegKey;
!
int i,found;
/*
* From a path on the form "HKEY_LOCAL_MACHINE\SOFTWARE\GNU", extract the following
parts:
***************
*** 134,234 ****
}
if (!found) {
php3_error(E_WARNING, "Unknown registry root key '%s'", root);
! return FAILURE;
}
status = RegOpenKeyEx(root_keys[i].hkey, path, 0, KEY_READ, &hkey);
if (status != ERROR_SUCCESS) {
! php3_error(E_WARNING, "Failed to open registry key, Windows error %d", status);
! return FAILURE;
}
pRegKey = emalloc(sizeof(RegKey));
pRegKey->hkey = hkey;
pRegKey->iSubKey = 0;
pRegKey->iSubValue = 0;
! return php3_list_do_insert(&GLOBAL(list), (void *) pRegKey, GLOBAL(registry_le_hkey));
}
! PHPAPI int _php3_win32_reg_read_key(int id, BYTE *buffer INLINE_TLS){
! int type;
DWORD dwBufSize;
LONG status;
FILETIME filetime;
! RegKey * pRegKey;
!
! pRegKey = php3_list_do_find(&GLOBAL(list), id, &type);
! if (type != GLOBAL(registry_le_hkey)) {
! php3_error(E_WARNING,"resource index %d has the wrong type", id);
! return FAILURE;
! }
dwBufSize = WIN32_REG_BUFSIZE;
status = RegEnumKeyEx(pRegKey->hkey, pRegKey->iSubKey, buffer, &dwBufSize, NULL, NULL,
NULL, &filetime);
if (status != ERROR_SUCCESS) {
! if (status != ERROR_NO_MORE_ITEMS)
! php3_error(E_WARNING, "Failed to enumerate registry key, Windows error %d", status);
! return FAILURE;
}
++pRegKey->iSubKey;
! return SUCCESS;
}
! PHPAPI int _php3_win32_reg_read_value(int id, BYTE *buffer INLINE_TLS){
LONG status;
! DWORD dwBufSize;
! RegKey * pRegKey;
! int type;
!
! pRegKey = php3_list_do_find(&GLOBAL(list), id, &type);
! if (type != GLOBAL(registry_le_hkey)) {
! php3_error(E_WARNING, "resource index %d has the wrong type", id);
! return FAILURE;
! }
!
! dwBufSize = WIN32_REG_BUFSIZE;
! status = RegEnumValue(pRegKey->hkey, pRegKey->iSubValue, buffer, &dwBufSize, NULL,
NULL, NULL, NULL);
if (status != ERROR_SUCCESS) {
! if (status != ERROR_NO_MORE_ITEMS)
! php3_error(E_WARNING, "Failed to enumerate registry key, Windows error %d", status);
! return FAILURE;
}
++pRegKey->iSubValue;
! return SUCCESS;
}
! PHPAPI int _php3_win32_reg_rewind(int id INLINE_TLS){
! RegKey * pRegKey;
! int type;
- pRegKey = php3_list_do_find(&GLOBAL(list), id, &type);
- if (type != GLOBAL(registry_le_hkey)) {
- php3_error(E_WARNING,"resource index %d has the wrong type", id);
- return FAILURE;
- }
-
pRegKey->iSubKey = 0;
pRegKey->iSubValue = 0;
return SUCCESS;
}
! PHPAPI int _php3_win32_reg_close(int id INLINE_TLS){
! RegKey * pRegKey;
LONG status;
- int type;
- pRegKey = php3_list_do_find(&GLOBAL(list), id, &type);
- if (type != GLOBAL(registry_le_hkey)) {
- php3_error(E_WARNING,"resource index %d has the wrong type", id);
- return FAILURE;
- }
- php3_list_do_delete(&GLOBAL(list),id);
-
status = RegCloseKey(pRegKey->hkey);
efree(pRegKey);
if(status != ERROR_SUCCESS)return FAILURE;
--- 136,229 ----
}
if (!found) {
+ efree(root);
+ efree(path);
php3_error(E_WARNING, "Unknown registry root key '%s'", root);
! return NULL;
}
status = RegOpenKeyEx(root_keys[i].hkey, path, 0, KEY_READ, &hkey);
if (status != ERROR_SUCCESS) {
! efree(root);
! efree(path);
! php3_error(E_WARNING, "Failed to open registry key, Windows error %s",
php3_win_err());
! return NULL;
}
+ efree(root);
+ efree(path);
+
pRegKey = emalloc(sizeof(RegKey));
pRegKey->hkey = hkey;
pRegKey->iSubKey = 0;
pRegKey->iSubValue = 0;
! pRegKey->ClassName[0] = '\0';
! pRegKey->dwcClassLen = MAX_PATH;
!
! RegQueryInfoKey (pRegKey->hkey, // Key handle.
! pRegKey->ClassName, // Buffer for class name.
! &pRegKey->dwcClassLen, // Length of class string.
! NULL, // Reserved.
! &pRegKey->dwcSubKeys, // Number of sub keys.
! &pRegKey->dwcMaxSubKey, // Longest sub key size.
! &pRegKey->dwcMaxClass, // Longest class string.
! &pRegKey->dwcValues, // Number of values for this key.
! &pRegKey->dwcMaxValueName, // Longest Value name.
! &pRegKey->dwcMaxValueData, // Longest Value data.
! &pRegKey->dwcSecDesc, // Security descriptor.
! &pRegKey->ftLastWriteTime); // Last write time.
!
! return pRegKey;
}
! PHPAPI BYTE *_php3_win32_reg_read_key(RegKey *pRegKey INLINE_TLS){
DWORD dwBufSize;
LONG status;
FILETIME filetime;
! BYTE buffer[WIN32_REG_BUFSIZE+1];
dwBufSize = WIN32_REG_BUFSIZE;
status = RegEnumKeyEx(pRegKey->hkey, pRegKey->iSubKey, buffer, &dwBufSize, NULL, NULL,
NULL, &filetime);
if (status != ERROR_SUCCESS) {
! if (status != ERROR_NO_MORE_ITEMS) {
! OutputDebugString(php3_win_err());
! php3_error(E_WARNING, "Failed to enumerate registry key, Windows error %s",
php3_win_err());
! }
! return NULL;
}
++pRegKey->iSubKey;
! return estrndup(buffer,dwBufSize);
}
! PHPAPI int _php3_win32_reg_read_value(RegKey *pRegKey, BYTE *buffer, DWORD *dwBufSize, DWORD
*dwType, BYTE *pvData, DWORD *dwDataSize INLINE_TLS){
LONG status;
!
! status = RegEnumValue(pRegKey->hkey, pRegKey->iSubValue, buffer, dwBufSize, NULL, dwType,
pvData, dwDataSize);
if (status != ERROR_SUCCESS) {
! if (status != ERROR_NO_MORE_ITEMS) {
! OutputDebugString(php3_win_err());
! php3_error(E_WARNING, "Failed to enumerate registry key, Windows error %s",
php3_win_err());
! }
! return status;
}
++pRegKey->iSubValue;
! return 1;
}
! PHPAPI int _php3_win32_reg_rewind(RegKey *pRegKey INLINE_TLS){
pRegKey->iSubKey = 0;
pRegKey->iSubValue = 0;
return SUCCESS;
}
! PHPAPI int _php3_win32_reg_close(RegKey *pRegKey INLINE_TLS){
LONG status;
status = RegCloseKey(pRegKey->hkey);
efree(pRegKey);
if(status != ERROR_SUCCESS)return FAILURE;
***************
*** 261,267 ****
RETURN_FALSE;
}
! dwType=_php3_win32_reg_read(value_name,pbuffer);
switch (dwType)
{
--- 256,262 ----
RETURN_FALSE;
}
! pbuffer=_php3_win32_reg_read(value_name,&dwType);
switch (dwType)
{
***************
*** 298,304 ****
--- 293,302 ----
pval *arg;
int arg_count = ARG_COUNT(ht);
char *value_name;
+ RegKey *pRegKey;
+ int ret=0;
TLS_VARS;
+
if(GLOBAL(php3_ini)->safe_mode){
php3_error(E_WARNING, "Registry unavailable, safe mode in effect!");
RETURN_FALSE;
***************
*** 315,331 ****
php3_error(E_WARNING, "invalid registry key name '%s'", value_name);
RETURN_FALSE;
}
!
! RETURN_LONG(_php3_win32_reg_open(value_name _INLINE_TLS));
}
void php3_win32_reg_read_key(INTERNAL_FUNCTION_PARAMETERS)
{
pval *arg;
! int arg_count = ARG_COUNT(ht);
! BYTE buffer[WIN32_REG_BUFSIZE+1];
TLS_VARS;
if(GLOBAL(php3_ini)->safe_mode){
php3_error(E_WARNING, "Registry unavailable, safe mode in effect!");
RETURN_FALSE;
--- 313,334 ----
php3_error(E_WARNING, "invalid registry key name '%s'", value_name);
RETURN_FALSE;
}
!
! if(pRegKey=_php3_win32_reg_open(value_name _INLINE_TLS)) {
! ret = php3_list_do_insert(list, (void *) pRegKey, GLOBAL(registry_le_hkey));
! }
! RETURN_LONG(ret);
}
void php3_win32_reg_read_key(INTERNAL_FUNCTION_PARAMETERS)
{
pval *arg;
! int arg_count = ARG_COUNT(ht), type;
! BYTE *buffer;
! RegKey *pRegKey;
TLS_VARS;
+
if(GLOBAL(php3_ini)->safe_mode){
php3_error(E_WARNING, "Registry unavailable, safe mode in effect!");
RETURN_FALSE;
***************
*** 336,342 ****
}
convert_to_long(arg);
! _php3_win32_reg_read_key(arg->value.lval, buffer _INLINE_TLS);
RETURN_STRING(buffer, 1);
}
--- 339,352 ----
}
convert_to_long(arg);
!
! pRegKey = php3_list_do_find(list, arg->value.lval, &type);
! if (type != GLOBAL(registry_le_hkey)) {
! php3_error(E_WARNING,"resource index %d has the wrong type", arg->value.lval);
! }
!
! buffer=_php3_win32_reg_read_key(pRegKey _INLINE_TLS);
!
RETURN_STRING(buffer, 1);
}
***************
*** 345,353 ****
void php3_win32_reg_read_value(INTERNAL_FUNCTION_PARAMETERS)
{
pval *arg;
! int arg_count = ARG_COUNT(ht);
! BYTE buffer[WIN32_REG_BUFSIZE+1];
TLS_VARS;
if(GLOBAL(php3_ini)->safe_mode){
php3_error(E_WARNING, "Registry unavailable, safe mode in effect!");
RETURN_FALSE;
--- 355,366 ----
void php3_win32_reg_read_value(INTERNAL_FUNCTION_PARAMETERS)
{
pval *arg;
! int arg_count = ARG_COUNT(ht), type;
! BYTE *buffer, *data;
! RegKey *pRegKey;
! DWORD dwType, dwbSize, dwSize;
TLS_VARS;
+
if(GLOBAL(php3_ini)->safe_mode){
php3_error(E_WARNING, "Registry unavailable, safe mode in effect!");
RETURN_FALSE;
***************
*** 359,375 ****
convert_to_long(arg);
! _php3_win32_reg_read_value(arg->value.lval, buffer _INLINE_TLS);
RETURN_STRING(buffer, 1);
}
void php3_win32_reg_rewind(INTERNAL_FUNCTION_PARAMETERS)
{
pval *id;
! int arg_count = ARG_COUNT(ht);
TLS_VARS;
if(GLOBAL(php3_ini)->safe_mode){
php3_error(E_WARNING, "Registry unavailable, safe mode in effect!");
RETURN_FALSE;
--- 372,401 ----
convert_to_long(arg);
! pRegKey = php3_list_do_find((list), arg->value.lval, &type);
! if (type != GLOBAL(registry_le_hkey)) {
! php3_error(E_WARNING, "resource index %d has the wrong type", arg->value.lval);
! }
+ dwbSize=(pRegKey->dwcMaxValueName+1);
+ buffer=emalloc(dwbSize);
+ dwSize=(pRegKey->dwcMaxValueData+1);
+ data=emalloc(dwSize);
+
+ _php3_win32_reg_read_value(pRegKey, buffer, &dwbSize, &dwType, data, &dwSize
_INLINE_TLS);
+
RETURN_STRING(buffer, 1);
+ /*FIXME how do we return data?*/
}
void php3_win32_reg_rewind(INTERNAL_FUNCTION_PARAMETERS)
{
pval *id;
! int arg_count = ARG_COUNT(ht), type;
! RegKey *pRegKey;
TLS_VARS;
+
if(GLOBAL(php3_ini)->safe_mode){
php3_error(E_WARNING, "Registry unavailable, safe mode in effect!");
RETURN_FALSE;
***************
*** 378,393 ****
if (arg_count != 1 || getParameters(ht, arg_count, &id) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(id);
! _php3_win32_reg_rewind(id->value.lval _INLINE_TLS);
}
void php3_win32_reg_close(INTERNAL_FUNCTION_PARAMETERS)
{
pval *id;
! int arg_count = ARG_COUNT(ht);
TLS_VARS;
if(GLOBAL(php3_ini)->safe_mode){
php3_error(E_WARNING, "Registry unavailable, safe mode in effect!");
RETURN_FALSE;
--- 404,430 ----
if (arg_count != 1 || getParameters(ht, arg_count, &id) == FAILURE) {
WRONG_PARAM_COUNT;
}
+
convert_to_long(id);
!
! pRegKey = php3_list_do_find((list), id->value.lval, &type);
! if (type != GLOBAL(registry_le_hkey)) {
! php3_error(E_WARNING,"resource index %d has the wrong type", id->value.lval);
! RETURN_FALSE;
! }
!
! _php3_win32_reg_rewind(pRegKey _INLINE_TLS);
! RETURN_TRUE;
}
void php3_win32_reg_close(INTERNAL_FUNCTION_PARAMETERS)
{
pval *id;
! int arg_count = ARG_COUNT(ht), type;
! RegKey *pRegKey;
TLS_VARS;
+
if(GLOBAL(php3_ini)->safe_mode){
php3_error(E_WARNING, "Registry unavailable, safe mode in effect!");
RETURN_FALSE;
***************
*** 397,404 ****
WRONG_PARAM_COUNT;
}
convert_to_long(id);
! if (_php3_win32_reg_close(id->value.lval _INLINE_TLS) == FAILURE) {
php3_error(E_WARNING, "Failed to close registry handle!");
}
! }
\ No newline at end of file
--- 434,556 ----
WRONG_PARAM_COUNT;
}
convert_to_long(id);
+
+ pRegKey = php3_list_do_find((list), id->value.lval, &type);
+ if (type != GLOBAL(registry_le_hkey)) {
+ php3_error(E_WARNING,"resource index %d has the wrong type", id->value.lval);
+ RETURN_FALSE;
+ }
+ php3_list_do_delete((list),id->value.lval);
!
! if (_php3_win32_reg_close(pRegKey _INLINE_TLS) == FAILURE) {
php3_error(E_WARNING, "Failed to close registry handle!");
+ RETURN_FALSE;
+ }
+ RETURN_TRUE
+ }
+
+ /*******************************************************************\
+ * Registry per-server and per-directory configuration functions *
+ \*******************************************************************/
+
+ /*
+ this function gets ini vars from
+ HKEY_LOCAL_MACHINE\Software\PHP\default and creates the hash
+ normaly created in the configuration parser.
+ */
+ #define PHP_REG_KEY "HKEY_LOCAL_MACHINE\\Software\\PHP\\"
+ extern HashTable configuration_hash;
+
+ int _reg_get_default_config(INLINE_TLS_VOID){
+ TCHAR regkey[1024];
+ BYTE * pbuffer,*key,*value;
+ DWORD dwType, dwValue, dwbSize, dwSize, i;
+ RegKey *pRegKey;
+ pval tmp;
+ int numread=0;
+
+ /* first, check to see if HKEY_LOCAL_MACHINE\Software\PHP\use_reg = 1 */
+ snprintf(regkey,1024,"%s%s",PHP_REG_KEY,"use_reg");
+
+ pbuffer = _php3_win32_reg_read(regkey,&dwType);
+
+ if (dwType != REG_DWORD) {
+ efree(pbuffer);
+ return 0;
}
! dwValue = *((DWORD *) pbuffer);
! efree(pbuffer);
! if (dwValue != 1) return 0;
!
! snprintf(regkey,1024,"%s%s",PHP_REG_KEY,"DefaultConfig");
! if (pRegKey = _php3_win32_reg_open(regkey _INLINE_TLS)) {
! /* ok default keys exist */
! for (i=0;i < pRegKey->dwcValues; i++){
! /* allocate memory for keynames and values. */
! dwSize = (pRegKey->dwcMaxValueName+1);
! key=emalloc(dwSize);
! dwbSize = (pRegKey->dwcMaxValueData+1);
! pbuffer=emalloc(dwbSize);
! if (_php3_win32_reg_read_value(pRegKey, key, &dwSize, &dwType, pbuffer, &dwbSize
_INLINE_TLS)) {
!
! if (dwType == REG_SZ) {
! {
! char buf[10];
! snprintf(buf,10," (%u) = ",dwSize);
! OutputDebugString(key);
! OutputDebugString(buf);
! OutputDebugString(pbuffer);
! snprintf(buf,10," (%u)",dwbSize);
! OutputDebugString(buf);
! OutputDebugString("\n");
! }
! if (strcmp(key,"extensions")) {
! /* ok, we have the keyname and it's value,
! lets put it into the config hash */
! //tmp=emalloc(sizeof(pval));
! tmp.value.str.val = php3_strndup(pbuffer,dwbSize);
! tmp.value.str.len = dwbSize;
! tmp.type = IS_STRING;
! _php3_hash_update(&configuration_hash,key,dwSize+1,(void *) &tmp,sizeof(pval),NULL);
! } else {
! /*we have to split the data into the different dl names
! php3_dladd(pbuffer);
! */
! }
! }
! numread++;
! }
! efree(key);
! key = NULL;
! efree(pbuffer);
! pbuffer = NULL;
!
! }
!
! {
! char buf[4];
! OutputDebugString("Number of entries = ");
! snprintf(buf,4,"%u",pRegKey->dwcValues);
! OutputDebugString(buf);
! OutputDebugString("\n");
! OutputDebugString("Entries read = ");
! snprintf(buf,4,"%d",numread);
! OutputDebugString(buf);
! OutputDebugString("\n");
! }
!
! _php3_win32_reg_close(pRegKey _INLINE_TLS);
!
! // tmp=emalloc(sizeof(tmp));
! tmp.value.str.val = php3_strndup("Registry",8);
! tmp.value.str.len = 8;
! tmp.type = IS_STRING;
!
_php3_hash_update(&configuration_hash,"cfg_file_path",sizeof("cfg_file_path"),(void
*) &tmp,sizeof(pval),NULL);
!
! /* temporarily do not use registry, until completely working */
! return 1;
! }
! /* now we will read our default registry and hash it */
! return 0;
! }
Index: php31/os/nt/registry.h
diff -c php31/os/nt/registry.h:1.2 php31/os/nt/registry.h:1.3
*** php31/os/nt/registry.h:1.2 Tue Sep 1 13:43:34 1998
--- php31/os/nt/registry.h Wed Sep 2 15:18:28 1998
***************
*** 10,26 ****
typedef struct {
HKEY hkey;
! DWORD iSubKey;
! DWORD iSubValue;
} RegKey;
! extern int _php3_win32_reg_init(INIT_FUNC_ARGS);
! extern PHPAPI int _php3_win32_reg_read(char *value_name, BYTE *buffer);
! extern PHPAPI int _php3_win32_reg_open(char *value_name INLINE_TLS);
! extern PHPAPI int _php3_win32_reg_read_key(int id, BYTE *buffer INLINE_TLS);
! extern PHPAPI int _php3_win32_reg_read_value(int id, BYTE *buffer INLINE_TLS);
! extern PHPAPI int _php3_win32_reg_rewind(int id INLINE_TLS);
! extern PHPAPI int _php3_win32_reg_close(int id INLINE_TLS);
/* Win32 functions */
extern void php3_win32_reg_read(INTERNAL_FUNCTION_PARAMETERS);
--- 10,37 ----
typedef struct {
HKEY hkey;
! DWORD iSubKey;
! DWORD iSubValue;
! CHAR ClassName[MAX_PATH]; // Buffer for class name.
! DWORD dwcClassLen; // Length of class string.
! DWORD dwcSubKeys; // Number of sub keys.
! DWORD dwcMaxSubKey; // Longest sub key size.
! DWORD dwcMaxClass; // Longest class string.
! DWORD dwcValues; // Number of values for this key.
! DWORD dwcMaxValueName; // Longest Value name.
! DWORD dwcMaxValueData; // Longest Value data.
! DWORD dwcSecDesc; // Security descriptor.
! FILETIME ftLastWriteTime; // Last write time.
} RegKey;
! extern int _php3_win32_reg_init(INLINE_TLS_VOID);
! extern PHPAPI BYTE *_php3_win32_reg_read(char *value_name, DWORD *dwType);
! extern PHPAPI RegKey *_php3_win32_reg_open(char *value_name INLINE_TLS);
! extern PHPAPI BYTE *_php3_win32_reg_read_key(RegKey *pRegKey INLINE_TLS);
! extern PHPAPI int _php3_win32_reg_read_value(RegKey *pRegKey, BYTE *name, DWORD *namesize, DWORD
*dwType, BYTE *pvData, DWORD *dwDataSize INLINE_TLS);
! extern PHPAPI int _php3_win32_reg_rewind(RegKey *pRegKey INLINE_TLS);
! extern PHPAPI int _php3_win32_reg_close(RegKey *pRegKey INLINE_TLS);
! extern int _reg_get_default_config(INLINE_TLS_VOID);
/* Win32 functions */
extern void php3_win32_reg_read(INTERNAL_FUNCTION_PARAMETERS);
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net