本文整理汇总了C++中UnicodeString::CString方法的典型用法代码示例。如果您正苦于以下问题:C++ UnicodeString::CString方法的具体用法?C++ UnicodeString::CString怎么用?C++ UnicodeString::CString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UnicodeString
的用法示例。
在下文中一共展示了UnicodeString::CString方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: NotifyAlarm
// notify the alarm if it exists
STATUS DdmSSAPIDriver::NotifyAlarm(void *pAlarmContext_)
{
TRACE_ENTRY(DdmSSAPIDriver::NotifyAlarm(void*));
AlarmList *pAL = pALhead->Find(pAlarmContext_);
STATUS erc = OK;
if (pAL)
{
AMSTR_CMND_INFO* pCmdInfo;
AMSTR_CMND_PARAMETERS* pCmdParams;
UnicodeString notes = UnicodeString(StringClass("this is an notify string"));
UnicodeString userName = UnicodeString(StringClass("toehler"));
pCmdInfo = (AMSTR_CMND_INFO *)new char[sizeof(AMSTR_CMND_INFO)];
memset(pCmdInfo,0,sizeof(AMSTR_CMND_INFO));
pCmdInfo->opcode = AMSTR_CMND_NOTIFY_ALARM;
pCmdParams = (AMSTR_CMND_PARAMETERS *) (&pCmdInfo->cmdParams);
pCmdParams->rid = pAL->GetRowId();
notes.CString(pCmdParams->notes, sizeof(pCmdParams->notes));
userName.CString(pCmdParams->userName, sizeof(pCmdParams->userName));
m_pCmdSender->csndrExecute(pCmdInfo,
(pCmdCompletionCallback_t)&DdmSSAPIDriver::
amstrCommandCompletionReply,
NULL);
}
else
erc = ERR;
return erc;
}
示例2: RemitAlarmFromUser
STATUS DdmSSAPIDriver::RemitAlarmFromUser(rowID rid, UnicodeString userName)
{
TRACE_ENTRY(DdmSSAPIDriver::RemitAlarmFromUser(void*));
AMSTR_CMND_INFO* pCmdInfo;
AMSTR_CMND_PARAMETERS* pCmdParams;
pCmdInfo = (AMSTR_CMND_INFO *)new char[sizeof(AMSTR_CMND_INFO)];
memset(pCmdInfo,0,sizeof(AMSTR_CMND_INFO));
pCmdInfo->opcode = AMSTR_CMND_REMIT_ALARM_FROM_USER;
pCmdParams = (AMSTR_CMND_PARAMETERS *) (&pCmdInfo->cmdParams);
pCmdParams->rid = rid;
userName.CString(pCmdParams->userName, sizeof(pCmdParams->userName));
m_pCmdSender->csndrExecute(pCmdInfo,
(pCmdCompletionCallback_t)&DdmSSAPIDriver::
amstrCommandCompletionReply,
NULL);
return OK;
}
示例3: UnicodeString
//////////////////////////////////////////////////////////////////////
//
// Change Array Name Reply Handler
//
//////////////////////////////////////////////////////////////////////
STATUS DdmRAIDMstr::
ProcessChangeArrayNameReply(void *_pCmdContext, STATUS status)
{
RMSTR_CHANGE_ARRAY_NAME_INFO *pChangeArrayNameInfo = NULL;
RMSTR_CMND_INFO *pCmdInfo = NULL;
RMSTR_CMND_PARAMETERS *pCmdParams = NULL;
STATUS rc = RMSTR_SUCCESS;
BOOL cmdComplete = false;
CONTEXT *pCmdContext = NULL;
RAID_ARRAY_DESCRIPTOR *pADTRecord = NULL;
RMSTR_EVT_ARRAY_NAME_CHANGED_STATUS *pEvtArrayNameChanged = NULL;
UnicodeString ucNewArrayName;
pCmdContext = (CONTEXT *)_pCmdContext;
pCmdInfo = (RMSTR_CMND_INFO *)pCmdContext->pData;
pCmdParams = &pCmdInfo->cmdParams;
pChangeArrayNameInfo =
(RMSTR_CHANGE_ARRAY_NAME_INFO *)&pCmdParams->changeArrayNameInfo;
pADTRecord = (RAID_ARRAY_DESCRIPTOR *)pCmdContext->pData1;
if (status != OS_DETAIL_STATUS_SUCCESS){
rc = RMSTR_ERR_INVALID_COMMAND;
cmdComplete = true;
} else {
switch(pCmdContext->state){
case CHANGE_NAME_ARRAY_NAME_READ:
// old array name is read into m_ucArrayName
// Delete the old name from the table
pCmdContext->state = CHANGE_NAME_OLD_NAME_DELETED;
m_pStringResourceManager->DeleteString(
RowId(pADTRecord->arrayNameRID),
(pTSCallback_t)&DdmRAIDMstr::ProcessChangeArrayNameReply,
pCmdContext);
break;
case CHANGE_NAME_OLD_NAME_DELETED:
// Now write the new array name into the table
ucNewArrayName = UnicodeString(
pChangeArrayNameInfo->newName);
pCmdContext->state = CHANGE_NAME_NEW_NAME_WRITTEN;
m_pStringResourceManager->WriteString(
ucNewArrayName,
&pADTRecord->arrayNameRID,
(pTSCallback_t)&DdmRAIDMstr::ProcessChangeArrayNameReply,
pCmdContext);
break;
case CHANGE_NAME_NEW_NAME_WRITTEN:
pCmdContext->state = CHANGE_NAME_ADT_RECORD_UPDATED;
status = m_pTableServices->TableServiceModifyRow(
RAID_ARRAY_DESCRIPTOR_TABLE,
&pADTRecord->thisRID, // row id to modify
pADTRecord,
sizeof(RAID_ARRAY_DESCRIPTOR),
&pADTRecord->thisRID,
(pTSCallback_t)&DdmRAIDMstr::ProcessChangeArrayNameReply,
pCmdContext);
break;
case CHANGE_NAME_ADT_RECORD_UPDATED:
// cmd is complete, report the status and generate event
ModifyRmstrData(
RAID_ARRAY,
&pADTRecord->thisRID,
pADTRecord);
cmdComplete = true;
break;
default:
break;
}
}
if (cmdComplete){
// Report the status of the change array name
m_pCmdServer->csrvReportCmdStatus(
pCmdContext->cmdHandle, // handle
rc, // completion code
NULL, // result Data
(void *)pCmdInfo); // Orig cmd info
if (rc == RMSTR_SUCCESS){
// Generate event for Array Name Changed
pEvtArrayNameChanged = new RMSTR_EVT_ARRAY_NAME_CHANGED_STATUS;
memset(pEvtArrayNameChanged,0,sizeof(RMSTR_EVT_ARRAY_NAME_CHANGED_STATUS));
pEvtArrayNameChanged->arrayRowId = pChangeArrayNameInfo->arrayRowId;
// Copy the old and new name back to the event
// Copy the Array Name back in the event
m_ucArrayName.CString(
pEvtArrayNameChanged->oldName,
//.........这里部分代码省略.........