DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

DmiNew(3dmi)


DmiNew -- create a DMI structure

Synopsis

#include <dmi2mem.h>

DmiTimestamp_t * DmiNewTimestamp ( DmiMemDsc_t memDsc, DmiErrorStatus_t * status);

DmiString_t * DmiNewString ( char * src , DmiMemDsc_t memDsc, DmiErrorStatus_t * status);

DmiOctetString_t * DmiNewOctetString ( size_t size, char * src , DmiMemDsc_t memDsc, DmiErrorStatus_t * status);

DmiDataUnion_t * DmiNewDataUnion ( DmiMemDsc_t memDsc, DmiErrorStatus_t * status);

DmiEnumInfo_t * DmiNewEnumInfo ( DmiMemDsc_t memDsc, DmiErrorStatus_t * status);

DmiAttributeInfo_t * DmiNewAttributeInfo ( DmiMemDsc_t memDsc, DmiErrorStatus_t * status);

DmiAttributeData_t * DmiNewAttributeData ( DmiMemDsc_t memDsc, DmiErrorStatus_t * status);

DmiGroupInfo_t * DmiNewGroupInfo( DmiMemDsc_t memDsc, DmiErrorStatus_t * status);

DmiComponentInfo_t * DmiNewComponentInfo ( DmiMemDsc_t memDsc, DmiErrorStatus_t * status);

DmiFileDataInfo_t * DmiNewFileDataInfo ( DmiMemDsc_t memDsc, DmiErrorStatus_t * status);

DmiClassNameInfo_t * DmiNewClassNameInfo ( DmiMemDsc_t memDsc, DmiErrorStatus_t * status);

DmiRowRequest_t * DmiNewRowRequest ( DmiMemDsc_t memDsc, DmiErrorStatus_t * status);

DmiRowData_t * DmiNewRowData ( DmiMemDsc_t memDsc, DmiErrorStatus_t * status);

DmiAttributeIds_t * DmiNewAttributeIds ( size_t size, DmiMemDsc_t memDsc, DmiErrorStatus_t * status);

DmiAttributeValues_t * DmiNewAttributeValues ( size_t size, DmiMemDsc_t memDsc, DmiErrorStatus_t * status);

DmiEnumList_t * DmiNewEnumList ( size_t size, DmiMemDsc_t memDsc, DmiErrorStatus_t * status);

DmiAttributeList_t * DmiNewAttributeList ( size_t size, DmiMemDsc_t memDsc, DmiErrorStatus_t * status);

DmiGroupList_t * DmiNewGroupList ( size_t size, DmiMemDsc_t memDsc, DmiErrorStatus_t * status);

DmiComponentList_t * DmiNewComponentList ( size_t size, DmiMemDsc_t memDsc, DmiErrorStatus_t * status);

DmiFileDataList_t * DmiNewFileDataList ( size_t size, DmiMemDsc_t memDsc, DmiErrorStatus_t * status);

DmiClassNameList_t * DmiNewClassNameList ( size_t size, DmiMemDsc_t memDsc, DmiErrorStatus_t * status);

DmiStringList_t * DmiNewStringList ( size_t size, DmiMemDsc_t memDsc, DmiErrorStatus_t * status);

DmiFileTypeList_t * DmiNewFileTypeList ( size_t size, DmiMemDsc_t memDsc, DmiErrorStatus_t * status);

DmiMultiRowRequest_t * DmiNewMultiRowRequest ( size_t size, DmiMemDsc_t memDsc, DmiErrorStatus_t * status);

DmiMultiRowData_t * DmiNewMultiRowData ( size_t size, DmiMemDsc_t memDsc, DmiErrorStatus_t * status);

DmiString_t FAR * DmiNewString ( const char * srcString , DmiMemDsc_t memDsc, DmiErrorStatus_t * status);

DmiString_t FAR * DmiNewUnicodeString ( const wchar_t * srcUnicodeString, DmiMemDsc_t memDsc, DmiErrorStatus_t * status);

DmiOctetString_t FAR * DmiNewOctetString ( size_t sizeOctet, const char * srcOctetString, DmiMemDsc_t memDsc, DmiErrorStatus_t * status);

DmiNodeAddress_t * DmiNewNodeAddress ( const char * pAddress, const char * pRpc, const char * pTransport, DmiMemDsc_t memDsc, DmiErrorStatus_t FAR * status);

Description

The DmiNew functions create the DMI data type structures in a memory model specified by the memDsc parameter. They create data of the type specified by the postfix. For example, DmiNewTimeStamp creates a new, zero-initialized DmiTimeStamp.

The contents of the newly-created data depend on the data type and the function's input parameters. If a function does not have default input parameters other than memDsc, then only zero-initialized, top-level DMI data type structures are created. For example, the DmiNewRowData(3dmi) function creates a DmiRowData structure with all the members initialized to zero.

Functions that create DMI list data types (for example, DmiAttributeList and DmiAttributeIds allocate a list of specified size. These functions allocate both top-level structures ({size, list}) and zero-initialized arrays of corresponding elements. Top-level structures contain the specified list size and a pointer to the newly-created list.

Some functions let you specify the entire contents of the new data structure. The DmiNewString and DmiNewUnicodeString functions create new DmiString for specified ANSI or UNICODE strings, correspondingly. DmiString size and contents are determined by the input string.

The DmiNewOctetString function creates a new DmiOctetString of specified size and content.

The DmiNewNodeAddress function creates a DmiNodeAddress structure with specified ``address'', ``rpc'' and ``transport'' fields.

Parameters


memDsc
(Input) Memory model descriptor. If memDsc is NULL, then the default memory model is used.

size
(Input) Number of elements in the data_type list.

srcString
(Input) Null-terminated ANSI string.

srcUnicodeString
(Input) Null-terminated UNICODE string. In UNICODE, a null character is 2 octets.

srcOctetString
(Input) Pointer to array of octets.

SizeOctet
(Input) Number of octets in the srcOctetString.

PAddress
(Input) NULL-terminated string that defines the address body of the DmiNodeAddress.

PRpc
(Input) NULL-terminated string that defines the rpc body of the DmiNodeAddress.

pTransport
(Input) NULL-terminated string which defines the transport body of the DmiNodeAddress.

status
(Output) Pointer to an address in memory where the DmiErrorStatus_t code is returned or NULL. When the status pointer is NULL, the error status is not returned. Possible error codes are:

DMIERR_NO_ERROR

DMIERR_OUT_OF_MEMORY

Return values

If successful, the DmiNew functions return a pointer to a newly allocated DMI data_type. Otherwise, they return NULL.

Notices

Portions of this page are derived from material for which the copyright owner is Intel Corporation, Inc. The material is reprinted with permission. See copyright page for a full statement of rights and permissions.


© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004