⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jwapdhmsg.pas

📁 比较全面的win32api开发包
💻 PAS
📖 第 1 页 / 共 2 页
字号:
{******************************************************************************}
{                                                       	               }
{ Performance Data Helper Error Codes API interface Unit for Object Pascal     }
{                                                       	               }
{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft          }
{ Corporation. All Rights Reserved.                                            }
{ 								               }
{ The original file is: pdhmsg.h, released August 2001. The original Pascal    }
{ code is: PdhMsg.pas, released December 2000. The initial developer of the    }
{ Pascal code is Marcel van Brakel (brakelm@chello.nl).                        }
{                                                                              }
{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001            }
{ Marcel van Brakel. All Rights Reserved.                                      }
{ 								               }
{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI)        }
{								               }
{ You may retrieve the latest version of this file at the Project JEDI home    }
{ page, located at http://delphi-jedi.org or my personal homepage located at   }
{ http://members.chello.nl/m.vanbrakel2                                        }
{								               }
{ The contents of this file are used with permission, subject to the Mozilla   }
{ Public License Version 1.1 (the "License"); you may not use this file except }
{ in compliance with the License. You may obtain a copy of the License at      }
{ http://www.mozilla.org/MPL/MPL-1.1.html                                      }
{                                                                              }
{ Software distributed under the License is distributed on an "AS IS" basis,   }
{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
{ the specific language governing rights and limitations under the License.    }
{                                                                              }
{ Alternatively, the contents of this file may be used under the terms of the  }
{ GNU Lesser General Public License (the  "LGPL License"), in which case the   }
{ provisions of the LGPL License are applicable instead of those above.        }
{ If you wish to allow use of your version of this file only under the terms   }
{ of the LGPL License and not to allow others to use your version of this file }
{ under the MPL, indicate your decision by deleting  the provisions above and  }
{ replace  them with the notice and other provisions required by the LGPL      }
{ License.  If you do not delete the provisions above, a recipient may use     }
{ your version of this file under either the MPL or the LGPL License.          }
{ 								               }
{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
{ 								               }
{******************************************************************************}

unit JwaPdhMsg;

{$WEAKPACKAGEUNIT}

{$HPPEMIT ''}
{$HPPEMIT '#include "pdhmsg.h"'}
{$HPPEMIT ''}

{$I WINDEFINES.INC}

interface

uses
  JwaWinType;

//     PDH DLL messages
//
//
//      Success Messages
//
//         the Win32 error value ERROR_SUCCESS is used for success returns
//
//      MESSAGE NAME FORMAT
//
//          PDH_CSTATUS_...   messages are data item status message and
//                     are returned in reference to the status of a data
//                     item
//          PDH_...           messages are returned by FUNCTIONS only and
//                     not used as data item status values
//
//      Success Messages
//         These messages are normally returned when the operation completed
//         successfully.
//
//
//  Values are 32 bit values layed out as follows:
//
//   3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
//   1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
//  +---+-+-+-----------------------+-------------------------------+
//  |Sev|C|R|     Facility          |               Code            |
//  +---+-+-+-----------------------+-------------------------------+
//
//  where
//
//      Sev - is the severity code
//
//          00 - Success
//          01 - Informational
//          10 - Warning
//          11 - Error
//
//      C - is the Customer code flag
//
//      R - is a reserved bit
//
//      Facility - is the facility code
//
//      Code - is the facility's status code
//
//
// Define the facility codes

const

//
// Define the severity codes
//

  STATUS_SEVERITY_WARNING          = $2;
  {$EXTERNALSYM STATUS_SEVERITY_WARNING}
  STATUS_SEVERITY_SUCCESS          = $0;
  {$EXTERNALSYM STATUS_SEVERITY_SUCCESS}
  STATUS_SEVERITY_INFORMATIONAL    = $1;
  {$EXTERNALSYM STATUS_SEVERITY_INFORMATIONAL}
  STATUS_SEVERITY_ERROR            = $3;
  {$EXTERNALSYM STATUS_SEVERITY_ERROR}

//
// MessageId: PDH_CSTATUS_VALID_DATA
//
// MessageText:
//
//  The returned data is valid.
//

  PDH_CSTATUS_VALID_DATA           = DWORD($00000000);
  {$EXTERNALSYM PDH_CSTATUS_VALID_DATA}

//
// MessageId: PDH_CSTATUS_NEW_DATA
//
// MessageText:
//
//  The return data value is valid and different from the last sample.
//

  PDH_CSTATUS_NEW_DATA             = DWORD($00000001);
  {$EXTERNALSYM PDH_CSTATUS_NEW_DATA}

//
//        Informational messages
//
//  None
//
//      Warning Messages
//         These messages are returned when the function has completed
//         successfully but the results may be different than expected.
//
//
// MessageId: PDH_CSTATUS_NO_MACHINE
//
// MessageText:
//
//  Unable to connect to specified machine or machine is off line.
//

  PDH_CSTATUS_NO_MACHINE           = DWORD($800007D0);
  {$EXTERNALSYM PDH_CSTATUS_NO_MACHINE}

//
// MessageId: PDH_CSTATUS_NO_INSTANCE
//
// MessageText:
//
//  The specified instance is not present.
//

  PDH_CSTATUS_NO_INSTANCE          = DWORD($800007D1);
  {$EXTERNALSYM PDH_CSTATUS_NO_INSTANCE}

//
// MessageId: PDH_MORE_DATA
//
// MessageText:
//
//  There is more data to return than would fit in the supplied buffer. Allocate
//  a larger buffer and call the function again.
//

  PDH_MORE_DATA                    = DWORD($800007D2);
  {$EXTERNALSYM PDH_MORE_DATA}

//
// MessageId: PDH_CSTATUS_ITEM_NOT_VALIDATED
//
// MessageText:
//
//  The data item has been added to the query, but has not been validated nor
//  accessed. No other status information on this data item is available.
//

  PDH_CSTATUS_ITEM_NOT_VALIDATED   = DWORD($800007D3);
  {$EXTERNALSYM PDH_CSTATUS_ITEM_NOT_VALIDATED}

//
// MessageId: PDH_RETRY
//
// MessageText:
//
//  The selected operation should be retried.
//

  PDH_RETRY                        = DWORD($800007D4);
  {$EXTERNALSYM PDH_RETRY}

//
// MessageId: PDH_NO_DATA
//
// MessageText:
//
//  No data to return.
//

  PDH_NO_DATA                      = DWORD($800007D5);
  {$EXTERNALSYM PDH_NO_DATA}

//
// MessageId: PDH_CALC_NEGATIVE_DENOMINATOR
//
// MessageText:
//
//  A counter with a negative denominator value was detected.
//

  PDH_CALC_NEGATIVE_DENOMINATOR    = DWORD($800007D6);
  {$EXTERNALSYM PDH_CALC_NEGATIVE_DENOMINATOR}

//
// MessageId: PDH_CALC_NEGATIVE_TIMEBASE
//
// MessageText:
//
//  A counter with a negative timebase value was detected.
//

  PDH_CALC_NEGATIVE_TIMEBASE       = DWORD($800007D7);
  {$EXTERNALSYM PDH_CALC_NEGATIVE_TIMEBASE}

//
// MessageId: PDH_CALC_NEGATIVE_VALUE
//
// MessageText:
//
//  A counter with a negative value was detected.
//

  PDH_CALC_NEGATIVE_VALUE          = DWORD($800007D8);
  {$EXTERNALSYM PDH_CALC_NEGATIVE_VALUE}

//
// MessageId: PDH_DIALOG_CANCELLED
//
// MessageText:
//
//  The user cancelled the dialog box.
//

  PDH_DIALOG_CANCELLED             = DWORD($800007D9);
  {$EXTERNALSYM PDH_DIALOG_CANCELLED}

//
// MessageId: PDH_END_OF_LOG_FILE
//
// MessageText:
//
//  The end of the log file was reached.
//

  PDH_END_OF_LOG_FILE              = DWORD($800007DA);
  {$EXTERNALSYM PDH_END_OF_LOG_FILE}

//
// MessageId: PDH_ASYNC_QUERY_TIMEOUT
//
// MessageText:
//
//  Time out while waiting for asynchronous counter collection thread to end.
//

  PDH_ASYNC_QUERY_TIMEOUT          = DWORD($800007DB);
  {$EXTERNALSYM PDH_ASYNC_QUERY_TIMEOUT}

//
// MessageId: PDH_CANNOT_SET_DEFAULT_REALTIME_DATASOURCE
//
// MessageText:
//
//  Cannot change set default realtime datasource. There are realtime query
//  sessions collecting counter data.
//

  PDH_CANNOT_SET_DEFAULT_REALTIME_DATASOURCE = DWORD($800007DC);
  {$EXTERNALSYM PDH_CANNOT_SET_DEFAULT_REALTIME_DATASOURCE}

//
//     Error Messages
//        These messages are returned when the function could not complete
//        as requested and some corrective action may be required by the
//        the caller or the user.
//
//
// MessageId: PDH_CSTATUS_NO_OBJECT
//
// MessageText:
//
//  The specified object is not found on the system.
//

  PDH_CSTATUS_NO_OBJECT            = DWORD($C0000BB8);
  {$EXTERNALSYM PDH_CSTATUS_NO_OBJECT}

//
// MessageId: PDH_CSTATUS_NO_COUNTER
//
// MessageText:
//
//  The specified counter could not be found.
//

  PDH_CSTATUS_NO_COUNTER           = DWORD($C0000BB9);
  {$EXTERNALSYM PDH_CSTATUS_NO_COUNTER}

//
// MessageId: PDH_CSTATUS_INVALID_DATA
//
// MessageText:
//
//  The returned data is not valid.
//

  PDH_CSTATUS_INVALID_DATA         = DWORD($C0000BBA);
  {$EXTERNALSYM PDH_CSTATUS_INVALID_DATA}

//
// MessageId: PDH_MEMORY_ALLOCATION_FAILURE
//
// MessageText:
//
//  A PDH function could not allocate enough temporary memory to complete the
//  operation. Close some applications or extend the pagefile and retry the
//  function.
//

  PDH_MEMORY_ALLOCATION_FAILURE    = DWORD($C0000BBB);
  {$EXTERNALSYM PDH_MEMORY_ALLOCATION_FAILURE}

//
// MessageId: PDH_INVALID_HANDLE
//
// MessageText:
//
//  The handle is not a valid PDH object.
//

  PDH_INVALID_HANDLE               = DWORD($C0000BBC);
  {$EXTERNALSYM PDH_INVALID_HANDLE}

//
// MessageId: PDH_INVALID_ARGUMENT
//
// MessageText:
//
//  A required argument is missing or incorrect.
//

  PDH_INVALID_ARGUMENT             = DWORD($C0000BBD);
  {$EXTERNALSYM PDH_INVALID_ARGUMENT}

//
// MessageId: PDH_FUNCTION_NOT_FOUND
//
// MessageText:
//
//  Unable to find the specified function.
//

  PDH_FUNCTION_NOT_FOUND           = DWORD($C0000BBE);
  {$EXTERNALSYM PDH_FUNCTION_NOT_FOUND}

//
// MessageId: PDH_CSTATUS_NO_COUNTERNAME
//
// MessageText:
//
//  No counter was specified.
//

  PDH_CSTATUS_NO_COUNTERNAME       = DWORD($C0000BBF);
  {$EXTERNALSYM PDH_CSTATUS_NO_COUNTERNAME}

//
// MessageId: PDH_CSTATUS_BAD_COUNTERNAME
//
// MessageText:
//
//  Unable to parse the counter path. Check the format and syntax of the
//  specified path.
//

  PDH_CSTATUS_BAD_COUNTERNAME      = DWORD($C0000BC0);
  {$EXTERNALSYM PDH_CSTATUS_BAD_COUNTERNAME}

//
// MessageId: PDH_INVALID_BUFFER
//
// MessageText:
//
//  The buffer passed by the caller is invalid.
//

  PDH_INVALID_BUFFER               = DWORD($C0000BC1);
  {$EXTERNALSYM PDH_INVALID_BUFFER}

//
// MessageId: PDH_INSUFFICIENT_BUFFER
//
// MessageText:
//
//  The requested data is larger than the buffer supplied. Unable to return the
//  requested data.
//

  PDH_INSUFFICIENT_BUFFER          = DWORD($C0000BC2);
  {$EXTERNALSYM PDH_INSUFFICIENT_BUFFER}

//
// MessageId: PDH_CANNOT_CONNECT_MACHINE
//
// MessageText:
//
//  Unable to connect to the requested machine.
//

  PDH_CANNOT_CONNECT_MACHINE       = DWORD($C0000BC3);
  {$EXTERNALSYM PDH_CANNOT_CONNECT_MACHINE}

//
// MessageId: PDH_INVALID_PATH
//
// MessageText:
//
//  The specified counter path could not be interpreted.
//

  PDH_INVALID_PATH                 = DWORD($C0000BC4);
  {$EXTERNALSYM PDH_INVALID_PATH}

//
// MessageId: PDH_INVALID_INSTANCE
//
// MessageText:
//
//  The instance name could not be read from the specified counter path.
//

  PDH_INVALID_INSTANCE             = DWORD($C0000BC5);
  {$EXTERNALSYM PDH_INVALID_INSTANCE}

//
// MessageId: PDH_INVALID_DATA
//
// MessageText:
//
//  The data is not valid.
//

  PDH_INVALID_DATA                 = DWORD($C0000BC6);
  {$EXTERNALSYM PDH_INVALID_DATA}

//
// MessageId: PDH_NO_DIALOG_DATA
//
// MessageText:
//
//  The dialog box data block was missing or invalid.
//

  PDH_NO_DIALOG_DATA               = DWORD($C0000BC7);
  {$EXTERNALSYM PDH_NO_DIALOG_DATA}

//
// MessageId: PDH_CANNOT_READ_NAME_STRINGS
//
// MessageText:
//
//  Unable to read the counter and/or explain text from the specified machine.
//

  PDH_CANNOT_READ_NAME_STRINGS     = DWORD($C0000BC8);
  {$EXTERNALSYM PDH_CANNOT_READ_NAME_STRINGS}

//
// MessageId: PDH_LOG_FILE_CREATE_ERROR
//
// MessageText:
//
//  Unable to create the specified log file.
//

  PDH_LOG_FILE_CREATE_ERROR        = DWORD($C0000BC9);
  {$EXTERNALSYM PDH_LOG_FILE_CREATE_ERROR}

//
// MessageId: PDH_LOG_FILE_OPEN_ERROR
//
// MessageText:
//
//  Unable to open the specified log file.
//

  PDH_LOG_FILE_OPEN_ERROR          = DWORD($C0000BCA);
  {$EXTERNALSYM PDH_LOG_FILE_OPEN_ERROR}

//
// MessageId: PDH_LOG_TYPE_NOT_FOUND
//
// MessageText:
//
//  The specified log file type has not been installed on this system.
//

  PDH_LOG_TYPE_NOT_FOUND           = DWORD($C0000BCB);
  {$EXTERNALSYM PDH_LOG_TYPE_NOT_FOUND}

//
// MessageId: PDH_NO_MORE_DATA
//
// MessageText:
//
//  No more data is available.
//

  PDH_NO_MORE_DATA                 = DWORD($C0000BCC);
  {$EXTERNALSYM PDH_NO_MORE_DATA}

//
// MessageId: PDH_ENTRY_NOT_IN_LOG_FILE
//
// MessageText:
//
//  The specified record was not found in the log file.
//

  PDH_ENTRY_NOT_IN_LOG_FILE        = DWORD($C0000BCD);
  {$EXTERNALSYM PDH_ENTRY_NOT_IN_LOG_FILE}

//

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -