mapidefs.pas
来自「Drag files and Drop to delphi forms 0402」· PAS 代码 · 共 2,456 行 · 第 1/5 页
PAS
2,456 行
record
cValues : ULONG;
lpat : ^Double;
end;
TSCurrencyArray =
record
cValues : ULONG;
lpcur : ^TCURRENCY;
end;
TSBinaryArray =
record
cValues : ULONG;
lpbin : ^TSBinary;
end;
TSDoubleArray =
record
cValues : ULONG;
lpdbl : ^Double;
end;
TSWStringArray =
record
cValues : ULONG;
lppszW : ^PWSTR;
end;
TSLPSTRArray =
record
cValues : ULONG;
lppszA : ^LPSTR;
end;
T__UPV =
record
case Integer of
1 :
(
i : Smallint; { case PT_I2 }
);
2 :
(
l : Longint; { case PT_LONG }
);
3 :
(
ul : ULONG; { alias for PT_LONG }
);
4 :
(
flt : Single; { case PT_R4 }
);
5 :
(
dbl : Double; { case PT_DOUBLE }
);
6 :
(
b : Smallint; { case PT_BOOLEAN }
);
7 :
(
cur : TCURRENCY; { case PT_CURRENCY }
);
8 :
(
at : Double; { case PT_APPTIME }
);
9 :
(
ft : TFILETIME; { case PT_SYSTIME }
);
10 :
(
lpszA : LPSTR; { case PT_STRING8 }
);
11 :
(
bin : TSBinary; { case PT_BINARY }
);
12 :
(
lpszW : PWSTR; { case PT_UNICODE }
);
13 :
(
lpguid : PGUID; { case PT_CLSID }
);
14 :
(
li : TLargeInteger; { case PT_I8 }
);
15 :
(
MVi : TSShortArray; { case PT_MV_I2 }
);
16 :
(
MVl : TSLongArray; { case PT_MV_LONG }
);
17 :
(
MVflt : TSRealArray; { case PT_MV_R4 }
);
18 :
(
MVdbl : TSDoubleArray; { case PT_MV_DOUBLE }
);
19 :
(
MVcur : TSCurrencyArray; { case PT_MV_CURRENCY }
);
20 :
(
MVat : TSAppTimeArray; { case PT_MV_APPTIME }
);
21 :
(
MVft : TSDateTimeArray; { case PT_MV_SYSTIME }
);
22 :
(
MVbin : TSBinaryArray; { case PT_MV_BINARY }
);
23 :
(
MVszA : TSLPSTRArray; { case PT_MV_STRING8 }
);
24 :
(
MVszW : TSWStringArray; { case PT_MV_UNICODE }
);
25 :
(
MVguid : TSGuidArray; { case PT_MV_CLSID }
);
26 :
(
MVli : TSLargeIntegerArray;{ case PT_MV_I8 }
);
27 :
(
err : SCODE; { case PT_ERROR }
);
28 :
(
x : Longint; { case PT_NULL, PT_OBJECT (no usable value) }
);
end;
TSPropValue =
record
ulPropTag : ULONG;
dwAlignPad : ULONG;
Value : T__UPV;
end;
PSPropValue = ^TSPropValue;
{ --------------------------------------------- }
{ Property Problem and Property Problem Arrays }
{ --------------------------------------------- }
type
TSPropProblem =
record
ulIndex : ULONG;
ulPropTag : ULONG;
scode : SCODE;
end;
PSPropProblem = ^TSPropProblem;
TSPropProblemArray =
record
cProblem : ULONG;
aProblem : array[0..MAPI_DIM - 1] of TSPropProblem;
end;
PSPropProblemArray = ^TSPropProblemArray;
(*
* ENTRYLIST
*)
type
TENTRYLIST = TSBinaryArray;
PENTRYLIST = ^TENTRYLIST;
(*
* FLATENTRYLIST
* MTSID
* FLATMTSIDLIST
*)
type
TFLATENTRY =
record
cb : ULONG;
abEntry : array[0..MAPI_DIM - 1] of Byte;
end;
PFLATENTRY = ^TFLATENTRY;
TFLATENTRYLIST =
record
cEntries : ULONG;
cbEntries : ULONG;
abEntries : array[0..MAPI_DIM - 1] of Byte;
end;
PFLATENTRYLIST = ^TFLATENTRYLIST;
TMTSID =
record
cb : ULONG;
ab : array[0..MAPI_DIM - 1] of Byte;
end;
PMTSID = ^TMTSID;
TFLATMTSIDLIST =
record
cMTSIDs : ULONG;
cbMTSIDs : ULONG;
abMTSIDs : array[0..MAPI_DIM - 1] of Byte;
end;
PFLATMTSIDLIST = ^TFLATMTSIDLIST;
{ No SizedXXX macros for these types. }
{ ------------------------------ }
{ ADRENTRY, ADRLIST }
type
TADRENTRY =
record
ulReserved1 : ULONG; { Never used }
cValues : ULONG;
rgPropVals : PSPropValue;
end;
PADRENTRY = ^TADRENTRY;
TADRLIST =
record
cEntries : ULONG;
aEntries : array[0..MAPI_DIM - 1] of TADRENTRY;
end;
PADRLIST = ^TADRLIST;
{ ------------------------------ }
{ SRow, SRowSet }
type
{!! Array for containing property values }
PSPropValueArray = ^TSPropValueArray;
TSPropValueArray = array[0..MaxInt div SizeOf(TSPropValue)-1] of TSPropValue;
TSRow =
record
ulAdrEntryPad : ULONG; { Pad so SRow's can map to ADRENTRY's }
cValues : ULONG; { Count of property values }
{!! lpProps member converted to array }
lpProps : PSPropValueArray; { Property value array }
end;
PSRow = ^TSRow;
TSRowSet =
record
cRows : ULONG; { Count of rows }
aRow : array[0..MAPI_DIM - 1] of TSRow;
{ Array of rows }
end;
PSRowSet = ^TSRowSet;
{ MAPI Allocation Routines ------------------------------------------------ }
type
TALLOCATEBUFFER = function (cbSize : ULONG; var lppBuffer : Pointer) : SCODE; stdcall;
TALLOCATEMORE = function (cbSize : ULONG; lpObject : Pointer;
var lppBuffer : Pointer) : SCODE; stdcall;
TFREEBUFFER = function (lpBuffer : Pointer) : ULONG; stdcall;
PALLOCATEBUFFER = ^TALLOCATEBUFFER;
PALLOCATEMORE = ^TALLOCATEMORE;
PFREEBUFFER = ^TFREEBUFFER;
{ MAPI Component Object Model Macros -------------------------------------- }
{ Pointers to MAPI Interfaces --------------------------------------------- }
type
PCIID = ^TIID;
{ Extended MAPI Error Information ----------------------------------------- }
type
TMAPIERROR =
record
ulVersion : ULONG;
lpszError : PChar;
lpszComponent : PChar;
ulLowLevelError : ULONG;
ulContext : ULONG;
end;
PMAPIERROR = ^TMAPIERROR;
{ IMAPIAdviseSink Interface ----------------------------------------------- }
(*
* Notification event types. The event types can be combined in a bitmask
* for filtering. Each one has a parameter structure associated with it:
*
* fnevCriticalError ERROR_NOTIFICATION
* fnevNewMail NEWMAIL_NOTIFICATION
* fnevObjectCreated OBJECT_NOTIFICATION
* fnevObjectDeleted OBJECT_NOTIFICATION
* fnevObjectModified OBJECT_NOTIFICATION
* fnevObjectCopied OBJECT_NOTIFICATION
* fnevSearchComplete OBJECT_NOTIFICATION
* fnevTableModified TABLE_NOTIFICATION
* fnevStatusObjectModified ?
*
* fnevExtended EXTENDED_NOTIFICATION
*)
const
fnevCriticalError = ULONG($00000001);
fnevNewMail = ULONG($00000002);
fnevObjectCreated = ULONG($00000004);
fnevObjectDeleted = ULONG($00000008);
fnevObjectModified = ULONG($00000010);
fnevObjectMoved = ULONG($00000020);
fnevObjectCopied = ULONG($00000040);
fnevSearchComplete = ULONG($00000080);
fnevTableModified = ULONG($00000100);
fnevStatusObjectModified = ULONG($00000200);
fnevReservedForMapi = ULONG($40000000);
fnevExtended = ULONG($80000000);
{ TABLE_NOTIFICATION event types passed in ulTableEvent }
const
TABLE_CHANGED = 1;
TABLE_ERROR = 2;
TABLE_ROW_ADDED = 3;
TABLE_ROW_DELETED = 4;
TABLE_ROW_MODIFIED = 5;
TABLE_SORT_DONE = 6;
TABLE_RESTRICT_DONE = 7;
TABLE_SETCOL_DONE = 8;
TABLE_RELOAD = 9;
{ Event Structures }
type
TERROR_NOTIFICATION =
record
cbEntryID : ULONG;
lpEntryID : PENTRYID;
scode : SCODE;
ulFlags : ULONG; { 0 or MAPI_UNICODE }
lpMAPIError : PMAPIERROR; { Detailed error information }
end;
TNEWMAIL_NOTIFICATION =
record
cbEntryID : ULONG;
lpEntryID : PENTRYID; { identifies the new message }
cbParentID : ULONG;
lpParentID : PENTRYID; { identifies the folder it lives in }
ulFlags : ULONG; { 0 or MAPI_UNICODE }
lpszMessageClass : PChar; { message class (UNICODE or string8) }
ulMessageFlags : ULONG; { copy of PR_MESSAGE_FLAGS }
end;
TOBJECT_NOTIFICATION =
record
cbEntryID : ULONG;
lpEntryID : PENTRYID; { EntryID of object }
ulObjType : ULONG; { Type of object }
cbParentID : ULONG;
lpParentID : PENTRYID; { EntryID of parent object }
cbOldID : ULONG;
lpOldID : PENTRYID; { EntryID of old object }
cbOldParentID : ULONG;
lpOldParentID : PENTRYID; { EntryID of old parent }
lpPropTagArray : PSPropTagArray;
end;
TTABLE_NOTIFICATION =
record
ulTableEvent : ULONG; { Identifies WHICH table event }
hResult : HResult; { Value for TABLE_ERROR }
propIndex : TSPropValue; { This row's "index property" }
propPrior : TSPropValue; { Preceding row's "index property" }
row : TSRow; { New data of added/modified row }
ulPad : ULONG; { Force to 8-byte boundary }
end;
TEXTENDED_NOTIFICATION =
record
ulEvent : ULONG; { extended event code }
cb : ULONG; { size of event parameters }
pbEventParameters : PBYTE; { event parameters }
end;
TSTATUS_OBJECT_NOTIFICATION =
record
cbEntryID : ULONG;
lpEntryID : PENTRYID;
cValues : ULONG;
lpPropVals : PSPropValue;
end;
TNOTIFICATION =
record
ulEventType : ULONG; { notification type, i.e. fnevSomething }
ulAlignPad : ULONG; { Force to 8-byte boundary }
info :
record
case Integer of
1 :
(
err : TERROR_NOTIFICATION;
);
2 :
(
newmail : TNEWMAIL_NOTIFICATION;
);
3 :
(
obj : TOBJECT_NOTIFICATION;
);
4 :
(
tab : TTABLE_NOTIFICATION;
);
5 :
(
ext : TEXTENDED_NOTIFICATION;
);
6 :
(
statobj : TSTATUS_OBJECT_NOTIFICATION;
);
end;
end;
PNOTIFICATION = ^TNOTIFICATION;
{ Callback function type for MAPIAllocAdviseSink }
TNOTIFCALLBACK = function (lpvContext : Pointer; cNotification : ULONG;
lpNotifications : PNOTIFICATION) : Longint; stdcall;
PNOTIFCALLBACK = ^TNOTIFCALLBACK;
(*
* Message name for the 16-bit MAPI notififcation engine.
* This can be used in 16-bit applications to force processing
* of notification callbacks.
*)
const
szMAPINotificationMsg = 'MAPI Notify window message';
{ IMAPIProgress Interface ------------------------------------------------- }
{ Flag values for the progress indicator }
const
MAPI_TOP_LEVEL = ULONG($00000001);
{ IMAPIProp Interface ----------------------------------------------------- }
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?