indexing
	description: "Workaround to get RAG_MULTI_SZ Key's"
	author: "Daniel Jacobi"
	date: "$Date: 2003/10/04 21:48:57 $"
	revision: "$Revision: 1.2 $"

class
	MY_WEL_REGISTRY

inherit
	WEL_REGISTRY
		redefine
			key_value
		end

feature -- Access

		key_value (key: POINTER; value_name: STRING): MY_WEL_REGISTRY_KEY_VALUE is
			-- Retrieve value of `value_name' associated with open
			-- `key'.
			-- The identifier 'key' relative to the parent key must
			-- have been opened with the KEY_QUERY_VALUE access.
--		require
--			value_name_possible: value_name /= void
--			key_valid: valid_value_for_hkey (key)
		local
			a: WEL_STRING
			res, type, size: INTEGER
			ext: WEL_STRING
		do
			create a.make (value_name)
			size := 512
			create ext.make_empty (size)
			res := cwin_reg_query_value_ex (key, a.item, default_pointer, $type, ext.item, $size)
			if res = error_success then
				create Result.my_make (type, ext.null_separated_strings)
--			else
--				if res = error_more_data then
--					create ext.make_empty (size)
--					res := cwin_reg_query_value_ex (key, a.item, default_pointer, $type, ext.item, $size)
--					if res = error_success then
--						create Result.make (type, ext.string)
--					end
--				end
			end
		end
		
end -- class MY_WEL_REGISTRY
