Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Application Server

GetString method

  • Last UpdatedJul 23, 2024
  • 1 minute read

Returns the value stored in the MxValue as a string.

Class

IMxValue

Syntax

[C#]

string GetString();

[Visual C++]

HRESULT GetString(

[out, retval] BSTR *pVal

);

Parameters

pVal

Receives the value. Use SysFreeString to free the BSTR when finished with it.

If the value stored in the MxValue is not of type MxString, a string representation of the value is returned as follows:

  • MxNoData - "No Data"

  • MxBoolean - "true" or "false"

  • MxInteger - "1234"

  • MxFloat - "3.5"

  • MxDouble - "3.5"

  • MxString - "Hello World"

  • MxTime - "Sun May 01 20:27:01 1994"

  • MxElapsedTime - "89384" (elapsed time in 100 nanosecond increments.)

  • MxReferenceType - "Valve1.pv"

  • MxStatusType - "Error detected by Requesting NMX: Request timed out."

  • MxDataTypeEnum - "MxInteger"

  • MxSecurityClassificationEnum - "MxSecurityFreeAccess"

  • MxDataQualityType - "Uncertain"

  • MxCustomEnum - "Open"

  • MxCustomStruct - "478602" (guid for the struct)

Returns

S_OK - Success

E_OUTOFMEMORY - Unable to allocate memory for the string.

E_POINTER - An invalid pointer was passed in.

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in