GetCompleteString

The method GetCompleteString returns a formatted message string in the requested language. This methode is used of the TcEvent object method ITcEvent::GetMsgString.

HRESULT GetCompleteString([in]long nEventId,
                       [in]long nSrcId,
                       [in] langId,
                       [in] TcEventHeader* pEventHead,
                       [in] SAFEARRAY(VARIANT)* eventData,
                       [out, retval] BSTR* msg)

Parameter

nEventId

[in] Variable with the Event Id

nSrcId

[in] Variable with the Source Id

langId

[in] The language id of the needed language. The needed language should be marked with *LCIDs. The following table gives a list of some language ids.

LCID

Description

1031

German

1033

US English

1034

Spanish

1036

French

pEventHead

[in] Pointer to a TcEventHeader object. This object is the event configuration.

eventData

[in] Pointer to a Safearray, that holds the event arguments. Its documented in the configuration of the Formatter how the event arguments have to be palced in the shown event message.

The followd data types are supported by the default Formatter:

int (16bit), long (32bit), float(32bit), double(64bit), string(BSTR). The eventdata is assigned when the event is shown.

msg

[out, retval] PPointer to a BSTR string that returns the formatted string.

Return Values

S_OK

Function successful.

E_POINTER

szFormat was an invalid pointer.

E_NOTIMPL

This method is not implemented.

Notes

Most standard Formatters, like the XML based Formatter (TcEventFormatter.TcXmlFormatter) try to return a string in the default language when the requested language cannot be found in the configuration of the formatter.

*LCID: more informations in the MSDN Library.