3.2.4.3.4 GetRawAccountingData (Opnum 10)

The GetRawAccountingData method returns raw accounting data from the accounting database (section 3.2.1.2).

 [id(4), helpstring("method GetRawAccountingData")] HRESULT GetRawAccountingData(
   [in] BSTR bstrStartingDate,
   [in] BSTR bstrEndingDate,
   [in] BSTR bstrMachineName,
   [out] BSTR* pbstrResult,
   [out] BOOL* pbIsThereMoreData
 );

bstrStartingDate: A string that specifies the starting date of the data, in date-and-time format (section 2.2.1.3). If this value is not in the correct format, the date range is ignored and the complete set of accounting data is returned.

bstrEndingDate: A string that specifies the ending date of the data, in date-and-time format. If this value is not in the correct format, the date range is ignored and the complete set of accounting data is returned.

bstrMachineName: A string that specifies the machine name of the accounting database server. A default accounting database SHOULD<43> be defined.

pbstrResult: A pointer to a string that returns raw accounting data.

The string is formatted as a set of rows representing accounting process entries. Rows are delimited by carriage return escape characters (\r). Each row of raw accounting data contains 38 columns delimited by newline escape characters (\n).

The following table lists the 38 columns in order of their position in the row.

Column

Description

TimeStamp

See CreationSystemTime of accounting database in section 3.2.1.2.

ComputerName

See ComputerName of accounting database in section 3.2.1.2.

ProcessId

See ProcessId of accounting database in section 3.2.1.2.

ProcessName

See ImageName of accounting database in section 3.2.1.2.

Domain

See DomainName of accounting database in section 3.2.1.2.

User

See UserName of accounting database in section 3.2.1.2.

PolicyName

See PolicyName of accounting database in section 3.2.1.2.

PolicySetTime

See PolicySetTime of accounting database in section 3.2.1.2.

ProcessMatchingCriteria

See ResourceGroupName of accounting database in section 3.2.1.2.

CreationTime

See CreationTime of accounting database in section 3.2.1.2.

EndTime

See EndTime of accounting database in section 3.2.1.2.

ProgramPath

See ImagePath of accounting database in section 3.2.1.2.

CommandLine

See ProcessCommandLine of accounting database in section 3.2.1.2.

SessionId

See SessionId of accounting database in section 3.2.1.2.

ThreadCount

See ThreadCount of accounting database in section 3.2.1.2.

TotalCPU

See TotalCPU of accounting database in section 3.2.1.2.

ElapsedTime

See ElapsedTime of accounting database in section 3.2.1.2.

KernelModeTime

See KernelModeTime of accounting database in section 3.2.1.2.

UserModeTime

See UserModeTime of accounting database in section 3.2.1.2.

PageFileUsage

See PageFileUsage of accounting database in section 3.2.1.2.

PeakPageFileUsage

See PeakPageFileUsage of accounting database in section 3.2.1.2.

PageFaultCount

See PageFaultCount of accounting database in section 3.2.1.2.

VirtualSize

See VirtualSize of accounting database in section 3.2.1.2.

PeakVirtualSize

See PeakVirtualSize of accounting database in section 3.2.1.2.

WorkingSetSize

See WorkingSetSize of accounting database in section 3.2.1.2.

PeakWorkingSetSize

See PeakWorkingSetSize of accounting database in section 3.2.1.2.

PrivatePageCount

See PrivatePageCount of accounting database in section 3.2.1.2.

QuotaPagedPoolUsage

See QuotaPagedPoolUsage of accounting database in section 3.2.1.2.

QuotaPeakPagedPoolUsage

See QuotaPeakPagedPoolUsage of accounting database in section 3.2.1.2.

QuotaNonPagedPoolUsage

See QuotaNonPagedPoolUsage of accounting database in section 3.2.1.2.

QuotaPeakNonPagedPoolUsage

See QuotaPeakNonPagedPoolUsage of accounting database in section 3.2.1.2.

ReadOperationCount

See ReadOperationCount of accounting database in section 3.2.1.2.

ReadTransferCount

See ReadTransferCount of accounting database in section 3.2.1.2.

WriteOperationCount

See WriteOperationCount of accounting database in section 3.2.1.2.

WriteTransferCount

See WriteTransferCount of accounting database in section 3.2.1.2.

OtherOperationCount

See OtherOperationCount of accounting database in section 3.2.1.2.

OtherTransferCount

See OtherTransferCount of accounting database in section 3.2.1.2.

GroupId

See GroupId of accounting database in section 3.2.1.2.

pbIsThereMoreData: A pointer to a Boolean value that returns whether more data is available.

Return Values: This method returns 0x00000000 for success, or a negative HRESULT value (in the following table or in [MS-ERREF] section 2.1.1) if an error occurs.

Return value/code

Description

0x00000000

S_OK

Operation successful.

0x80070057

E_INVALIDARG

One or more arguments are invalid.

0xC1FF01F7

WRM_ERR_ACCOUNTING_FAILED

WSRM encountered an error in accounting.

0xC1FF01FA

WRM_ERR_WYUKON_NOT_CONNECTABLE

Cannot establish a connection to the accounting database due to an error other than one of the errors of the WRM_ERR_WYUKON_CORRUPTED return value.

0xC1FF01FB

WRM_ERR_WYUKON_CORRUPTED

Cannot establish a connection to the accounting database; either the database is in single-user mode and already connected, or it is in an invalid or corrupted state.

0xC1FF01FC

WRM_ERR_WYUKON_NOT_INSTALLED

The accounting database is not installed on the specified server.

0xC1FF0203

WRM_ERR_JET_SERVER_TOO_BUSY

The server can service only one accounting request at a time.<44>

Additional IWRMAccounting interface methods are specified in section 3.2.4.3.