Returns the name of an input record field.
HRESULT STDMETHODCALLTYPE GetFieldName(IN DWORD fIndex, OUT BSTR *pbszFieldName);
fieldName = GetFieldName(fIndex);
C++ example:
HRESULT CProcessesInputContext::GetFieldName(IN DWORD fIndex, OUT BSTR *pbszFieldName) { switch(fIndex) { case 0: { *pbszFieldName = SysAllocString(L"ImageName"); break; } case 1: { *pbszFieldName = SysAllocString(L"PID"); break; } case 2: { *pbszFieldName = SysAllocString(L"ParentPID"); break; } case 3: { *pbszFieldName = SysAllocString(L"Threads"); break; } } return S_OK; }VBScript example:
Function GetFieldName(nFieldIndex) Select Case nFieldIndex Case 0 GetFieldName = "QFE" Case 1 GetFieldName = "Description" Case 2 GetFieldName = "InstallDate" Case 3 GetFieldName = "InstalledBy" Case 4 GetFieldName = "Comments" Case 5 GetFieldName = "SP" End Select End Function
© 2004 Microsoft Corporation. All rights reserved.