indexing
	description: "Encapsulation of EXEPTINFO structure"
	status: "See notice at end of class"
	date: "$Date$"
	revision: "$Revision$"

class interface
	ECOM_EXCEP_INFO

create 

	make
			-- Allocate item
			-- (from ECOM_STRUCTURE)
		ensure -- from WEL_STRUCTURE
			not_shared: not shared

	make_from_pointer (a_pointer: POINTER)
			-- Make from pointer.
		require -- from ECOM_STRUCTURE
			valid_pointer: a_pointer /= default_pointer

feature -- Access

	bstr_description: STRING
			-- No description available.
		ensure
			non_void_bstr_description: Result /= void

	bstr_help_file: STRING
			-- No description available.
		ensure
			non_void_bstr_help_file: Result /= void

	bstr_source: STRING
			-- No description available.
		ensure
			non_void_bstr_source: Result /= void

	dw_help_context: INTEGER
			-- No description available.

	item: POINTER
			-- Generic Windows handle or structure pointer.
			-- Can be a HWND, HICON, RECT *, WNDCLASS *, etc...
			-- (from WEL_ANY)

	pv_reserved: POINTER
			-- No description available.

	scode: ECOM_HRESULT
			-- No description available.
		ensure
			non_void_scode: Result /= void

	w_code: INTEGER
			-- No description available.

	w_reserved: INTEGER
			-- No description available.
	
feature -- Measurement

	structure_size: INTEGER
			-- Size of EXCEPINFO structure
		ensure -- from WEL_STRUCTURE
			positive_result: Result > 0
	
feature -- Status report

	exists: BOOLEAN
			-- Does the item exist?
			-- (from WEL_ANY)
		ensure -- from WEL_ANY
			Result = (item /= default_pointer)

	shared: BOOLEAN
			-- Is item shared by another object?
			-- If False (by default), item will
			-- be destroyed by destroy_item.
			-- If True, item will not be destroyed.
			-- (from WEL_ANY)
	
feature -- Status setting

	set_shared
			-- Set shared to True.
			-- (from WEL_ANY)
		ensure -- from WEL_ANY
			shared: shared

	set_unshared
			-- Set shared to False.
			-- (from WEL_ANY)
		ensure -- from WEL_ANY
			unshared: not shared
	
feature -- Removal

	dispose
			-- Destroy the inner structure of Current.
			--
			-- This function should be called by the GC when the
			-- object is collected or by the user if Current is
			-- no more usefull.
			-- (from WEL_ANY)
	
feature -- Conversion

	to_integer: INTEGER
			-- Converts item to an integer.
			-- (from WEL_ANY)
		ensure -- from WEL_ANY
			Result = cwel_pointer_to_integer (item)
	
feature -- Basic operations

	initialize
			-- Fill Current with zeros.
			-- (from WEL_STRUCTURE)
		require -- from WEL_STRUCTURE
			exists: exists

	initialize_with_character (a_character: CHARACTER)
			-- Fill current with a_character.
			-- (from WEL_STRUCTURE)
		require -- from WEL_STRUCTURE
			exists: exists

	memory_copy (source_pointer: POINTER; length: INTEGER)
			-- Copy length bytes from source_pointer to item.
			-- (from WEL_STRUCTURE)
		require -- from WEL_STRUCTURE
			length_small_enough: length <= structure_size
			length_large_enough: length > 0
			exists: exists
	
feature -- Basic Operations

	set_bstr_description (a_bstr_description: STRING)
			-- Set bstr_description with a_bstr_description.

	set_bstr_help_file (a_bstr_help_file: STRING)
			-- Set bstr_help_file with a_bstr_help_file.

	set_bstr_source (a_bstr_source: STRING)
			-- Set bstr_source with a_bstr_source.

	set_dw_help_context (a_dw_help_context: INTEGER)
			-- Set dw_help_context with a_dw_help_context.

	set_pv_reserved (a_pv_reserved: POINTER)
			-- Set pv_reserved with a_pv_reserved.

	set_scode (a_scode: ECOM_HRESULT)
			-- Set scode with a_scode.
		require
			non_void_a_scode: a_scode /= void

	set_value (source: like Current)
			-- Set Current to 'source'.
			-- (from ECOM_STRUCTURE)
		require -- from ECOM_STRUCTURE
			non_void: source /= void
			valid_source: source.item /= default_pointer

	set_w_code (a_w_code: INTEGER)
			-- Set w_code with a_w_code.

	set_w_reserved (a_w_reserved: INTEGER)
			-- Set w_reserved with a_w_reserved.
	
invariant

		-- from ANY
	reflexive_equality: standard_is_equal (Current)
	reflexive_conformance: conforms_to (Current)

end -- class ECOM_EXCEP_INFO