From a12ed7f506263c6ec34c7df6bbcb3e8434841403 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 24 Jul 2002 08:58:03 +0000 Subject: done! printer_info_2, devicemode, sec_desc, & printer data all enumerate and display correctly in regedit.exe. Not sure about REG_SZ values in PrinterDriverData. If we store these in UNICODE, I'll have to fix up a few things. REG_BINARY & REG_DWORD are fine. (This used to be commit 2a30c243ec28734bbc721dfc01b743faa6f73788) --- source3/registry/reg_frontend.c | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) (limited to 'source3/registry/reg_frontend.c') diff --git a/source3/registry/reg_frontend.c b/source3/registry/reg_frontend.c index db612709d1..c0788c1b75 100644 --- a/source3/registry/reg_frontend.c +++ b/source3/registry/reg_frontend.c @@ -202,7 +202,19 @@ REGISTRY_VALUE* regval_ctr_specific_value( REGVAL_CTR *ctr, uint32 idx ) } /*********************************************************************** - Ad a new regostry value to the array + Retrive the TALLOC_CTX associated with a REGISTRY_VALUE + **********************************************************************/ + +TALLOC_CTX* regval_ctr_getctx( REGVAL_CTR *val ) +{ + if ( !val ) + return NULL; + + return val->ctx; +} + +/*********************************************************************** + Add a new regostry value to the array **********************************************************************/ int regval_ctr_addvalue( REGVAL_CTR *ctr, char *name, uint16 type, @@ -235,25 +247,6 @@ int regval_ctr_addvalue( REGVAL_CTR *ctr, char *name, uint16 type, ctr->values[ctr->num_values]->type = type; ctr->values[ctr->num_values]->data_p = talloc_memdup( ctr->ctx, data_p, size ); ctr->values[ctr->num_values]->size = size; -#if 0 - switch ( type ) - { - case REG_SZ: - ctr->values[ctr->num_values]->data.string = talloc_strdup( ctr->ctx, data_p ); - break; - case REG_MULTI_SZ: - ctr->values[ctr->num_values]->data.string = talloc_memdup( ctr->ctx, data_p, size ); - break; - case REG_DWORD: - ctr->values[ctr->num_values]->data.dword = *(uint32*)data_p; - break; - case REG_BINARY: - ctr->values[ctr->num_values]->data.binary = talloc_memdup( ctr->ctx, data_p, size ); - break; - - } -#endif - ctr->num_values++; } -- cgit