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

📄 jwawinfax.pas

📁 比较全面的win32api开发包
💻 PAS
📖 第 1 页 / 共 5 页
字号:
{******************************************************************************}
{                                                       	               }
{ Windows FAX API interface unit for Object Pascal                             }
{                                                       	               }
{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft          }
{ Corporation. All Rights Reserved.                                            }
{ 								               }
{ The original file is: winfax.h, released November 2001. The original Pascal  }
{ code is: WinFax.pas, released April 2002. 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 JwaWinFax;

{$WEAKPACKAGEUNIT}

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

{$I WINDEFINES.INC}

interface

uses
  JwaWinType, JwaWinError, JwaWinBase, JwaWinNT;

//
// FAX ERROR CODES
//

const
  FAX_ERR_START = 7001; // First fax specific error code
  {$EXTERNALSYM FAX_ERR_START}

  FAX_ERR_SRV_OUTOFMEMORY           = 7001;
  {$EXTERNALSYM FAX_ERR_SRV_OUTOFMEMORY}
  FAX_ERR_GROUP_NOT_FOUND           = 7002;
  {$EXTERNALSYM FAX_ERR_GROUP_NOT_FOUND}
  FAX_ERR_BAD_GROUP_CONFIGURATION   = 7003;
  {$EXTERNALSYM FAX_ERR_BAD_GROUP_CONFIGURATION}
  FAX_ERR_GROUP_IN_USE              = 7004;
  {$EXTERNALSYM FAX_ERR_GROUP_IN_USE}
  FAX_ERR_RULE_NOT_FOUND            = 7005;
  {$EXTERNALSYM FAX_ERR_RULE_NOT_FOUND}
  FAX_ERR_NOT_NTFS                  = 7006;
  {$EXTERNALSYM FAX_ERR_NOT_NTFS}
  FAX_ERR_DIRECTORY_IN_USE          = 7007;
  {$EXTERNALSYM FAX_ERR_DIRECTORY_IN_USE}
  FAX_ERR_FILE_ACCESS_DENIED        = 7008;
  {$EXTERNALSYM FAX_ERR_FILE_ACCESS_DENIED}
  FAX_ERR_MESSAGE_NOT_FOUND         = 7009;
  {$EXTERNALSYM FAX_ERR_MESSAGE_NOT_FOUND}
  FAX_ERR_DEVICE_NUM_LIMIT_EXCEEDED = 7010;
  {$EXTERNALSYM FAX_ERR_DEVICE_NUM_LIMIT_EXCEEDED}
  FAX_ERR_NOT_SUPPORTED_ON_THIS_SKU = 7011;
  {$EXTERNALSYM FAX_ERR_NOT_SUPPORTED_ON_THIS_SKU}
  FAX_ERR_VERSION_MISMATCH          = 7012; // Fax client/server versions mismtach
  {$EXTERNALSYM FAX_ERR_VERSION_MISMATCH}
  FAX_ERR_RECIPIENTS_LIMIT          = 7013; // Recipients limit in a single broadcast
  {$EXTERNALSYM FAX_ERR_RECIPIENTS_LIMIT}

  FAX_ERR_END = 7013; // Last fax specific error code
  {$EXTERNALSYM FAX_ERR_END}

//
// MessageId: FAX_E_SRV_OUTOFMEMORY
//
// MessageText:
//
//  The fax server failed to allocate memory.
//

  FAX_E_SRV_OUTOFMEMORY = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or FAX_ERR_SRV_OUTOFMEMORY);
  {$EXTERNALSYM FAX_E_SRV_OUTOFMEMORY}

//
// MessageId: FAX_E_GROUP_NOT_FOUND
//
// MessageText:
//
//  The fax server failed to locate an outbound routing group by name.
//

  FAX_E_GROUP_NOT_FOUND = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or FAX_ERR_GROUP_NOT_FOUND);
  {$EXTERNALSYM FAX_E_GROUP_NOT_FOUND}

//
// MessageId: FAX_E_BAD_GROUP_CONFIGURATION
//
// MessageText:
//
//  The fax server encountered an outbound routing group with bad configuration.
//

  FAX_E_BAD_GROUP_CONFIGURATION = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or FAX_ERR_BAD_GROUP_CONFIGURATION);
  {$EXTERNALSYM FAX_E_BAD_GROUP_CONFIGURATION}

//
// MessageId: FAX_E_GROUP_IN_USE
//
// MessageText:
//
//  The fax server cannot remove an outbound routing group because it is in use by one or more outbound routing rules.
//

  FAX_E_GROUP_IN_USE = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or FAX_ERR_GROUP_IN_USE);
  {$EXTERNALSYM FAX_E_GROUP_IN_USE}

//
// MessageId: FAX_E_RULE_NOT_FOUND
//
// MessageText:
//
//  The fax server failed to locate an outbound routing rule by country code and area code.
//

  FAX_E_RULE_NOT_FOUND = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or FAX_ERR_RULE_NOT_FOUND);
  {$EXTERNALSYM FAX_E_RULE_NOT_FOUND}

//
// MessageId: FAX_E_NOT_NTFS
//
// MessageText:
//
//  The fax server cannot set an archive folder to a non-NTFS partition.
//

  FAX_E_NOT_NTFS = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or FAX_ERR_NOT_NTFS);
  {$EXTERNALSYM FAX_E_NOT_NTFS}

//
// MessageId: FAX_E_DIRECTORY_IN_USE
//
// MessageText:
//
//  The fax server cannot use the same folder for both the inbox and the sent-items archives.
//

  FAX_E_DIRECTORY_IN_USE = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or FAX_ERR_DIRECTORY_IN_USE);
  {$EXTERNALSYM FAX_E_DIRECTORY_IN_USE}

//
// MessageId: FAX_E_FILE_ACCESS_DENIED
//
// MessageText:
//
//  The fax server cannot access the specified file or folder.
//

  FAX_E_FILE_ACCESS_DENIED = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or FAX_ERR_FILE_ACCESS_DENIED);
  {$EXTERNALSYM FAX_E_FILE_ACCESS_DENIED}

//
// MessageId: FAX_E_MESSAGE_NOT_FOUND
//
// MessageText:
//
//  The fax server cannot find the job or message by its ID.
//

  FAX_E_MESSAGE_NOT_FOUND = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or FAX_ERR_MESSAGE_NOT_FOUND);
  {$EXTERNALSYM FAX_E_MESSAGE_NOT_FOUND}

//
// MessageId: FAX_E_DEVICE_NUM_LIMIT_EXCEEDED
//
// MessageText:
//
//  The fax server cannot complete the operation because the number of active fax devices allowed for this version of Windows was exceeded.
//

  FAX_E_DEVICE_NUM_LIMIT_EXCEEDED = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or FAX_ERR_DEVICE_NUM_LIMIT_EXCEEDED);
  {$EXTERNALSYM FAX_E_DEVICE_NUM_LIMIT_EXCEEDED}

//
// MessageId: FAX_E_NOT_SUPPORTED_ON_THIS_SKU
//
// MessageText:
//
//  The fax server cannot complete the operation because it is not supported for this version of Windows.
//

  FAX_E_NOT_SUPPORTED_ON_THIS_SKU = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or FAX_ERR_NOT_SUPPORTED_ON_THIS_SKU);
  {$EXTERNALSYM FAX_E_NOT_SUPPORTED_ON_THIS_SKU}

//
// MessageId: FAX_E_VERSION_MISMATCH
//
// MessageText:
//
//  The fax server API version does not support the requested operation.
//

  FAX_E_VERSION_MISMATCH = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or FAX_ERR_VERSION_MISMATCH);
  {$EXTERNALSYM FAX_E_VERSION_MISMATCH}

//
// MessageId: FAX_E_RECIPIENT_LIMIT
//
// MessageText:
//
// The limit on the number of recipients for a single fax broadcast was reached.
//

  FAX_E_RECIPIENTS_LIMIT = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or FAX_ERR_RECIPIENTS_LIMIT);
  {$EXTERNALSYM FAX_E_RECIPIENTS_LIMIT}

type
  FAX_ENUM_LOG_LEVELS = (
    FAXLOG_LEVEL_NONE,
    FAXLOG_LEVEL_MIN,
    FAXLOG_LEVEL_MED,
    FAXLOG_LEVEL_MAX);
  {$EXTERNALSYM FAX_ENUM_LOG_LEVELS}
  TFaxEnumLogLevels = FAX_ENUM_LOG_LEVELS;

  FAX_ENUM_LOG_CATEGORIES = (
    FAXLOG_CATEGORY_FILLER0,
    FAXLOG_CATEGORY_INIT,                   // Initialization / shutdown
    FAXLOG_CATEGORY_OUTBOUND,               // Outbound messages
    FAXLOG_CATEGORY_INBOUND,                // Inbound messages
    FAXLOG_CATEGORY_UNKNOWN);               // Unknown category (all others)
  {$EXTERNALSYM FAX_ENUM_LOG_CATEGORIES}
  TFaxEnumLogCategories = FAX_ENUM_LOG_CATEGORIES;

  PFAX_LOG_CATEGORYA = ^FAX_LOG_CATEGORYA;
  {$EXTERNALSYM PFAX_LOG_CATEGORYA}
  _FAX_LOG_CATEGORYA = record
    Name: LPCSTR; // logging category name
    Category: DWORD; // logging category number
    Level: DWORD; // logging level for the category
  end;
  {$EXTERNALSYM _FAX_LOG_CATEGORYA}
  FAX_LOG_CATEGORYA = _FAX_LOG_CATEGORYA;
  {$EXTERNALSYM FAX_LOG_CATEGORYA}
  TFaxLogCategoryA = FAX_LOG_CATEGORYA;
  PFaxLogCategoryA = PFAX_LOG_CATEGORYA;

  PFAX_LOG_CATEGORYW = ^FAX_LOG_CATEGORYW;
  {$EXTERNALSYM PFAX_LOG_CATEGORYW}
  _FAX_LOG_CATEGORYW = record
    Name: LPCWSTR; // logging category name
    Category: DWORD; // logging category number
    Level: DWORD; // logging level for the category
  end;
  {$EXTERNALSYM _FAX_LOG_CATEGORYW}
  FAX_LOG_CATEGORYW = _FAX_LOG_CATEGORYW;
  {$EXTERNALSYM FAX_LOG_CATEGORYW}
  TFaxLogCategoryW = FAX_LOG_CATEGORYW;
  PFaxLogCategoryW = PFAX_LOG_CATEGORYW;

{$IFDEF UNICODE}
  FAX_LOG_CATEGORY = FAX_LOG_CATEGORYW;
  {$EXTERNALSYM FAX_LOG_CATEGORY}
  PFAX_LOG_CATEGORY = PFAX_LOG_CATEGORYW;
  {$EXTERNALSYM PFAX_LOG_CATEGORY}
  TFaxLogCategory = TFaxLogCategoryW;
  PFaxLogCategory = PFaxLogCategoryW;
{$ELSE}
  FAX_LOG_CATEGORY = FAX_LOG_CATEGORYA;
  {$EXTERNALSYM FAX_LOG_CATEGORY}
  PFAX_LOG_CATEGORY = PFAX_LOG_CATEGORYA;
  {$EXTERNALSYM PFAX_LOG_CATEGORY}
  TFaxLogCategory = TFaxLogCategoryA;
  PFaxLogCategory = PFaxLogCategoryA;
{$ENDIF}

  PFAX_TIME = ^FAX_TIME;
  {$EXTERNALSYM PFAX_TIME}
  _FAX_TIME = record
    Hour: WORD;
    Minute: WORD;
  end;
  {$EXTERNALSYM _FAX_TIME}
  FAX_TIME = _FAX_TIME;
  {$EXTERNALSYM FAX_TIME}
  TFaxTime = FAX_TIME;
  PFaxTime = PFAX_TIME;

  PFAX_CONFIGURATIONA = ^FAX_CONFIGURATIONA;
  {$EXTERNALSYM PFAX_CONFIGURATIONA}
  _FAX_CONFIGURATIONA = record
    SizeOfStruct: DWORD; // size of this structure
    Retries: DWORD; // number of retries for fax send
    RetryDelay: DWORD; // number of minutes between retries
    DirtyDays: DWORD; // number of days to keep an unsent job in the queue
    Branding: BOOL; // fsp should brand outgoing faxes
    UseDeviceTsid: BOOL; // server uses device tsid only
    ServerCp: BOOL; // clients must use cover pages on the server
    PauseServerQueue: BOOL; // is the server queue paused?
    StartCheapTime: FAX_TIME; // start of discount rate period
    StopCheapTime: FAX_TIME; // end of discount rate period
    ArchiveOutgoingFaxes: BOOL; // whether outgoing faxes should be archived
    ArchiveDirectory: LPCSTR; // archive directory for outgoing faxes
    Reserved: LPCSTR; // Reserved; must be NULL
  end;
  {$EXTERNALSYM _FAX_CONFIGURATIONA}

⌨️ 快捷键说明

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