problema al consultar clave reg_multi_sz en registro de windows

Gabriel Genellina gagsl-py en yahoo.com.ar
Mar Feb 13 03:11:37 CET 2007


En Mon, 12 Feb 2007 22:49:28 -0300, Josu Rodriguez <jrvilda en gmail.com>  
escribió:

> Curioso,
> he probado con HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Rpc
> DCOM Protocols que es tambien REG_MULTI_SZ y funcionan todas las pruebas
> anteriores
> ¿podria ser un caracter exztraño o algo asi?
> no me pasa con otra

Hay un poblema con los REG_MULTI_SZ, y es que es responsabilidad del  
programador armar bien el contenido, con los NUL de separadores e  
incluyendo los dos NUL del final que hay que contar tambien dentro del  
tamaño del buffer.
Como dice http://msdn2.microsoft.com/en-us/library/ms724911.aspx: "If the  
data has the REG_SZ, REG_MULTI_SZ or REG_EXPAND_SZ type, the string may  
not have been stored with the proper null-terminating characters.  
Therefore, even if the function returns ERROR_SUCCESS, the application  
should ensure that the string is properly terminated before using it (...)"

Podrias usar el regedit, exportar esa rama que tiene problemas a un  
archivo, y mirar los valores a ver como estan. Yo diria que algo esta mal  
armado.

-- 
Gabriel Genellina

------------ próxima parte ------------
_______________________________________________
Python-es mailing list
Python-es en aditel.org
http://listas.aditel.org/listinfo/python-es


Más información sobre la lista de distribución Python-es