📄 oomisc.pas
字号:
(***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1
*
* The contents of this file are 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/
*
* 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.
*
* The Original Code is TurboPower Async Professional
*
* The Initial Developer of the Original Code is
* TurboPower Software
*
* Portions created by the Initial Developer are Copyright (C) 1991-2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* ***** END LICENSE BLOCK ***** *)
{*********************************************************}
{* OOMISC.PAS 4.06 *}
{*********************************************************}
{* Miscellaneous supporting methods and types *}
{*********************************************************}
{
OOMisc is our catch-all unit for supporting methods and definitions.
OOMisc is used by almost all APRO units, and is automatically included
in the uses clause when an APRO component is dropped on a form.
The APRO base classes are defined here also.
A bit of APRO trivia: OOMisc stands for "Object Oriented Miscellaneous",
and was introduced in the early DOS days.
}
{Global defines potentially affecting this unit}
{$I AWDEFINE.INC}
{Options required for this unit}
{$IFNDEF Win32}
{$L-}
{$ENDIF}
unit OoMisc;
{-Unit for miscellaneous routines}
interface
uses
WinTypes,
WinProcs,
{$IFNDEF PrnDrv}
Classes,
Controls,
ShellAPI,
OleCtrls,
Forms,
{$IFNDEF DrvInst}
Graphics,
{$ENDIF}
{$ENDIF}
MMSystem,
SysUtils,
Messages;
{ need this for the 16-bit printer drivers }
{$IFNDEF UseResourceStrings}
{$IFDEF Win32}
{$R APRO.R32}
{$ELSE}
{$R APRO.R16}
{$ENDIF}
{$ENDIF}
const
ApVersionStr = 'v4.06';
{$IFDEF Apax}
ApaxVersionStr = 'v1.13';
{$ENDIF}
{ Product name}
ApdProductName = 'Async Professional';
ApdShortProductName = 'APRO';
ApdVendor = 'TurboPower Software Company';
ApdVendorURL = 'http://www.TurboPower.com';
{ Version numbers }
ApdXSLImplementation = 0.0;
ApdXMLSpecification = '1.0';
{$IFDEF Win32}
fsPathName = 255;
fsDirectory = 255;
fsFileName = 255;
fsExtension = 255;
fsName = 255;
{$ELSE}
fsPathName = 79;
fsDirectory = 67;
fsFileName = 8;
fsExtension = 4;
fsName = 12;
{$ENDIF}
{shareable reading file mode}
ApdShareFileRead = $40;
const
{ Printer driver consts }
ApdDefFileName = 'C:\DEFAULT.APF';
ApdPipeTimeout = 5000; { ms }
ApdPipeName = '\\.\pipe\ApFaxCnv';
ApdSemaphoreName = 'ApFaxCnvSem';
ApdRegKey = '\SOFTWARE\TurboPower\ApFaxCnv\Settings';
ApdIniFileName = 'APFPDENG.INI';
ApdIniSection = 'Settings';
ApdIniKey = 'AutoExec';
ApdDef32PrinterName = 'APF Fax Printer';
ApdDef16PrinterName = 'Print To Fax';
ApdDefPrinterPort = 'PRINTFAX';
ApdDefaultTerminalName = '<default>';
ApdNoTerminalName = '<none>';
{Event codes: (inbound)}
eNull = 0;
eStartDoc = 1;
eEndDoc = 2;
{Event codes: (outbound)}
eSetFileName = 3;
{$IFDEF Win32}
type
TPipeEvent = record
Event : Byte;
Data : ShortString;
end;
{$IFNDEF Delphi5}
TOleEnum = type DWORD;
{$ENDIF}
{ XML definitions }
DOMString = WideString;
{$ENDIF}
{$IFNDEF Win32}
type
{ define some types used by the 16-bit fax printer driver }
AnsiChar = Char;
PAnsiChar = PChar;
AnsiString = string;
ShortString = string;
POverlapped = pointer;
DWORD = LongInt;
{$ENDIF}
type
CharSet = set of char;
{$IFDEF AProBCB}
{$IFDEF Ver140}
TPassString = string;
{$ELSE}
TPassString = string[255];
{$ENDIF}
TApdHwnd = Integer;
{$ELSE}
TPassString = string[255];
TApdHwnd = HWND;
{$ENDIF}
{Standard event timer record structure used by all timing routines}
EventTimer = record
StartTicks : LongInt; {Tick count when timer was initialized}
ExpireTicks : LongInt; {Tick count when timer will expire}
end;
{$IFNDEF PRNDRV} {!!.06}
type{ moved from AdTapi.pas } {!!.06}
{ TAPI device config record, opaque and undefined by definition } {!!.06}
PTapiConfigRec = ^TTapiConfigRec; {!!.06}
TTapiConfigRec = record {!!.06}
DataSize : Cardinal; {!!.06}
Data : array[0..1023] of Byte; {!!.06}
end;
{ moved from AdRasUtl.pas } {!!.06}
const {RasMaximum buffer sizes} {!!.06}
RasMaxDomain = 15; {!!.06}
RasMaxPassword = 256; {!!.06}
RasMaxUserName = 256; {!!.06}
RasMaxEntryName = 256; {!!.06}
RasMaxPhoneBook = 256; {!!.06}
RasMaxError = 256; {!!.06}
RasMaxEntries = 64; {!!.06}
RasMaxDeviceName = 128; {!!.06}
RasMaxDeviceType = 16; {!!.06}
RasMaxPhoneNumber = 128; {!!.06}
RasMaxCallBackNum = 128; {!!.06}
RasMaxAreaCode = 10; {!!.06}
RasMaxPadType = 32; {!!.06}
RasMaxX25Address = 200; {!!.06}
RasMaxIPAddress = 15; {!!.06}
RasMaxIPXAddress = 21; {!!.06}
RasMaxFacilities = 200; {!!.06}
RasMaxUserData = 200; {!!.06}
type { moved from AdRasUtl.pas } {!!.06}
{RAS IP address - "a.b.c.d"} {!!.06}
PRasIPAddr = ^TRasIPAddr; {!!.06}
TRasIPAddr = record {!!.06}
a : byte; {!!.06}
b : byte; {!!.06}
c : byte; {!!.06}
d : byte; {!!.06}
end; {!!.06}
type { moved from AdRasUtl.pas } {!!.06}
{RAS phonebook entry properties} {!!.06}
{!!.06} {Renamed fields to sync with underlying RASENTRY structure }
{ dwOptions -> dwfOptions, dwAlternatesOffset -> dwAlternateOffset, }
{ dwNetProtocols -> dwfNetProtocols }
PRasEntry = ^TRasEntry; {!!.06}
TRasEntry = record {!!.06}
dwSize : DWord; {!!.06}
dwfOptions : DWord; {!!.06}
dwCountryID : DWord; {!!.06}
dwCountryCode : DWord; {!!.06}
szAreaCode : array[0..RasMaxAreaCode] of char; {!!.06}
szLocalPhoneNumber : array[0..RasMaxPhoneNumber] of char; {!!.06}
dwAlternateOffset : DWord; {!!.06}
IPAddr : TRasIPAddr; {!!.06}
IPAddrDns : TRasIPAddr; {!!.06}
IPAddrDnsAlt : TRasIPAddr; {!!.06}
IPAddrWins : TRasIPAddr; {!!.06}
IPAddrWinsAlt : TRasIPAddr; {!!.06}
dwFrameSize : DWord; {!!.06}
dwfNetProtocols : DWord; {!!.06}
dwFramingProtocol : DWord; {!!.06}
szScript : array[0..Max_PATH-1] of char; {!!.06}
szAutodialDll : array[0..Max_PATH-1] of char; {!!.06}
szAutodialFunc : array[0..Max_PATH-1] of char; {!!.06}
szDeviceType : array[0..RasMaxDeviceType] of char; {!!.06}
szDeviceName : array[0..RasMaxDeviceName] of char; {!!.06}
szX25PadType : array[0..RasMaxPadType] of char; {!!.06}
szX25Address : array[0..RasMaxX25Address] of char; {!!.06}
szX25Facilities : array[0..RasMaxFacilities] of char; {!!.06}
szX25UserData : array[0..RasMaxUserData] of char; {!!.06}
dwChannels : DWord; {!!.06}
dwReserved1 : DWord; {!!.06}
dwReserved2 : DWord; {!!.06}
end; {!!.06}
const {RASENTRY 'dwfOptions' bit flags} {!!.06}
RASEO_UseCountryAndAreaCodes = $00000001; {!!.06}
RASEO_SpecificIpAddr = $00000002; {!!.06}
RASEO_SpecificNameServers = $00000004; {!!.06}
RASEO_IpHeaderCompression = $00000008; {!!.06}
RASEO_RemoteDefaultGateway = $00000010; {!!.06}
RASEO_DisableLcpExtensions = $00000020; {!!.06}
RASEO_TerminalBeforeDial = $00000040; {!!.06}
RASEO_TerminalAfterDial = $00000080; {!!.06}
RASEO_ModemLights = $00000100; {!!.06}
RASEO_SwCompression = $00000200; {!!.06}
RASEO_RequireEncryptedPw = $00000400; {!!.06}
RASEO_RequireMsEncryptedPw = $00000800; {!!.06}
RASEO_RequireDataEncryption = $00001000; {!!.06}
RASEO_NetworkLogon = $00002000; {!!.06}
RASEO_UseLogonCredentials = $00004000; {!!.06}
RASEO_PromoteAlternates = $00008000; {!!.06}
RASEO_SecureLocalFiles = $00010000; {!!.06}
RASEO_RequireEAP = $00020000; {!!.06}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -