cniSetElementValue 组

将值设置到指定的语法元素的函数。

语法

void cniSetElementBitArrayValue(
  int*                returnCode,
  CciElement*               targetElement,
  const struct CciBitArray* value);
void cniSetElementBooleanValue(
  int*                returnCode,
  CciElement*               targetElement,
  CciBool                    value);
void cniSetElementByteArrayValue(
  int*                returnCode,
  CciElement*               targetElement,
  const struct CciByteArray* value);
void cniSetElementCharacterValue(
  int*                returnCode,
  CciElement*               targetElement,
  const CciChar*             value,
  CciSize                    length);
void cniSetElementDateValue(
  int*                returnCode,
  CciElement*               targetElement,
  const struct CciDate*      value);
void cniSetElementDecimalValue(
  int*                returnCode,
  CciElement*               targetElement,
  const CciChar*             value);
void cniSetElementGmtTimestampValue(
  int*                returnCode,
  CciElement*               targetElement,
  const struct CciTimestamp* value);
void cniSetElementGmtTimeValue(
  int*                returnCode,
  CciElement*               targetElement,
  const struct CciTime*      value);
void cniSetElementIntegerValue(
  int*                returnCode,
  CciElement*               targetElement,
  CciInt                     value);
void cniSetElementRealValue(
  int*                returnCode,
  CciElement*               targetElement,
  CciReal                    value);
void cniSetElementTimestampValue(
  int*                returnCode,
  CciElement*               targetElement,
  const struct CciTimestamp* value);
void cniSetElementTimeValue(
  int*                returnCode,
  CciElement*               targetElement,
  const struct CciTime*      value);

参数

returnCode
来自函数(输出)的返回码。可能的返回码是:
  • CCI_SUCCESS
  • CCI_EXCEPTION
  • CCI_INV_ELEMENT_OBJECT
  • CCI_INV_DATA_POINTER
  • CCI_INV_DATA_BUFLEN
targetElement
目标语法元素对象(输入)的地址。
value
存储在语法元素中的值(输入)。
length
数据值(输入)的长度。仅用于相关函数调用。

返回值

无。 如果发生错误,则 returnCode 参数表明错误原因。

示例

  static char* functionName = (char *)"_Input_run()";
  void*        buffer;
  CciTerminal* terminalObject;
  int          buflen = 4096;
  int          rc = CCI_SUCCESS;
  int          rcDispatch = CCI_SUCCESS;
	char xmlData[] = "<A>data</a>";
	buffer = malloc(buflen);
	memcpy(buffer, &xmlData, sizeof(xmlData));
	cniSetInputBuffer(&rc, message, buffer, buflen);
声明 | 商标 | 下载 | | 支持 | 反馈
Copyright IBM Corporation 1999, 2006 最后更新:2006/05/19
as07980_