INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES

indexing

title: "To handle strings that are allocated by one component and freed by another, Automation defines a special set of functions. These functions use the following data type: typedef OLECHAR FAR* BSTR;"
project: "Visual Eiffel Win32 Library"
revision: "$Revision: 1.1 $"
copyright: "Copyright (C) 1996-2005 Object Tools Group"
license: "http://visual-eiffel.com/license"
cluster: winlib
class WAPI_BSTR_MANIPULATION_FUNCTIONS
feature -- Queries

frozen SysAllocString (sz: POINTER): POINTER
-- Allocates a new string and copies the passed string into it. Returns
-- Null if there is insufficient memory, and if Null, Null is passed in.

frozen SysAllocStringByteLen (psz: POINTER; len: INTEGER): POINTER
-- Takes an ANSI string as input, and returns a BSTR that contains an ANSI
-- string. Does not perform any ANSI-to-Unicode translation.

frozen SysAllocStringLen (pch: POINTER; cch: INTEGER): POINTER
-- Allocates a new string, copies cch characters from the passed string
-- into it, and then appends a null character.

frozen SysFreeString (bstr: POINTER): INTEGER
-- Frees a string allocated previously by SysAllocString,
-- SysAllocStringByteLen, SysReAllocString, SysAllocStringLen, or
-- SysReAllocStringLen.

frozen SysReAllocString (pbstr: POINTER; sz: POINTER): INTEGER
-- Allocates a new BSTR and copies the passed string into it, then frees
-- the BSTR referenced by pbstr, and finally resets pbstr to point to the
-- new BSTR.
require
valid_pbstr: pbstr /= default_pointer
valid_sz: sz /= default_pointer

frozen SysReAllocStringLen (pbstr: POINTER; pch: POINTER; cch: INTEGER): INTEGER
-- Creates a new BSTR containing a specified number of characters from
-- an old BSTR, and frees the old BSTR.

frozen SysStringByteLen (bstr: POINTER): INTEGER
-- Returns the length (in bytes) of a BSTR.
require
valid_bstr: bstr /= default_pointer

frozen SysStringLen (bstr: POINTER): INTEGER
-- Returns the length of a BSTR.
require
valid_bstr: bstr /= default_pointer
end -- class WAPI_BSTR_MANIPULATION_FUNCTIONS

INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES