- 论坛徽章:
- 0
|
C语言编程方式,看看 QUSLOBJ API
/*-------------------------------------------------------------------*/
/* Call API to load the object names to the user space. */
/*-------------------------------------------------------------------*/
QUSLOBJ(spc_name, /* User space name and library */
fmt_name, /* Format name */
obj_lib, /* Object name and library */
obj_type, /* Object type */
error_code); /* Optional Parameter Group 1:
void * Error code */
if(error_code.ec_fields.Bytes_Available > 0)
{
strmovcpy(ErrMsgId, error_code.ec_fields.Exception_Id, 7);
printf("Error: QUSLOBJ() MsgId='%s'\n", ErrMsgId);
return ERR_QUSLOBJ;
}
/*-------------------------------------------------------------------*/
/* Call API to return the starting position of the first block, the */
/* length of each data block, and the number of blocks are returned. */
/*-------------------------------------------------------------------*/
rc = ReadUserSpace4ListAPIsGenericHeaderFmt0100(spc_name,
&Offset_to_header_section,
&Size_header_section,
&entrypos,
&numentries,
&entrylen,
ErrMsgId);
if(rc < 0)
return rc;
/****************************************************************/
/* Loop through the entries and get fld of the list */
/****************************************************************/
rc = ReadUserSpace_QUSLOBJ_OBJL0700(spc_name,
entrypos,
numentries,
entrylen,
printMode,
fp,
ErrMsgId);
。。。。。。 |
|