mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-22 19:29:24 +02:00
* base units from base/winunits to winunits-base
git-svn-id: trunk@9638 -
This commit is contained in:
parent
e3162d0af0
commit
6f2a821c19
18
.gitattributes
vendored
18
.gitattributes
vendored
@ -4544,6 +4544,24 @@ packages/paszlib/tests/example.pas svneol=native#text/plain
|
||||
packages/paszlib/tests/minigzip.pas svneol=native#text/plain
|
||||
packages/paszlib/tests/miniunz.pas svneol=native#text/plain
|
||||
packages/paszlib/tests/minizip.pas svneol=native#text/plain
|
||||
packages/winunits-base/Makefile svneol=native#text/plain
|
||||
packages/winunits-base/Makefile.fpc svneol=native#text/plain
|
||||
packages/winunits-base/fpmake.inc svneol=native#text/plain
|
||||
packages/winunits-base/fpmake.pp svneol=native#text/plain
|
||||
packages/winunits-base/src/activex.pp svneol=native#text/plain
|
||||
packages/winunits-base/src/buildwinutilsbase.pp svneol=native#text/plain
|
||||
packages/winunits-base/src/comconst.pp svneol=native#text/plain
|
||||
packages/winunits-base/src/commctrl.pp svneol=native#text/plain
|
||||
packages/winunits-base/src/comobj.pp svneol=native#text/plain
|
||||
packages/winunits-base/src/flatsb.pp svneol=native#text/plain
|
||||
packages/winunits-base/src/mmsystem.pp svneol=native#text/plain
|
||||
packages/winunits-base/src/ole2.pp svneol=native#text/plain
|
||||
packages/winunits-base/src/oleserver.pp svneol=native#text/plain
|
||||
packages/winunits-base/src/richedit.pp svneol=native#text/plain
|
||||
packages/winunits-base/src/shellapi.pp svneol=native#text/plain
|
||||
packages/winunits-base/src/shfolder.pp svneol=native#text/plain
|
||||
packages/winunits-base/src/shlobj.pp svneol=native#text/plain
|
||||
packages/winunits-base/src/winver.pp svneol=native#text/plain
|
||||
rtl/COPYING -text
|
||||
rtl/COPYING.FPC -text
|
||||
rtl/Makefile svneol=native#text/plain
|
||||
|
2745
packages/winunits-base/Makefile
Normal file
2745
packages/winunits-base/Makefile
Normal file
File diff suppressed because it is too large
Load Diff
30
packages/winunits-base/Makefile.fpc
Normal file
30
packages/winunits-base/Makefile.fpc
Normal file
@ -0,0 +1,30 @@
|
||||
#
|
||||
# Makefile.fpc for WinUnits
|
||||
#
|
||||
|
||||
[package]
|
||||
name=winunits-base
|
||||
version=2.2.0
|
||||
|
||||
[target]
|
||||
units=buildwinutilsbase
|
||||
implicitunits=flatsb winver mmsystem comobj comconst commctrl ole2 activex shellapi shlobj oleserver \
|
||||
shfolder richedit
|
||||
|
||||
examples=examples
|
||||
|
||||
rsts = jwawintype comconst
|
||||
|
||||
[install]
|
||||
buildunit=buildwinutilsbase
|
||||
fpcpackage=y
|
||||
|
||||
[default]
|
||||
fpcdir=../..
|
||||
|
||||
[compiler]
|
||||
options=-Ur
|
||||
sourcedir=src
|
||||
|
||||
[rules]
|
||||
.NOTPARALLEL:
|
24
packages/winunits-base/fpmake.inc
Normal file
24
packages/winunits-base/fpmake.inc
Normal file
@ -0,0 +1,24 @@
|
||||
StartPackage('winunits-base');
|
||||
{$IF defined(ALLPACKAGES)}
|
||||
Directory:='winunits-base';
|
||||
{$ELSEIF defined(EXTRAPACKAGES)}
|
||||
Directory:='winunits-base';
|
||||
{$ENDIF}
|
||||
OS:=[win32,win64];
|
||||
T:=Targets.AddUnit('buildwinutils');
|
||||
T.Install:=False;
|
||||
T:=Targets.AddUnit('activex');
|
||||
T:=Targets.AddUnit('comconst');
|
||||
T:=Targets.AddUnit('commctrl');
|
||||
T:=Targets.AddUnit('comobj');
|
||||
T:=Targets.AddUnit('flatsb');
|
||||
T:=Targets.AddUnit('mmsystem');
|
||||
T:=Targets.AddUnit('ole2');
|
||||
T:=Targets.AddUnit('oleserver');
|
||||
T:=Targets.AddUnit('richedit');
|
||||
T:=Targets.AddUnit('shellapi');
|
||||
T:=Targets.AddUnit('shfolder');
|
||||
T:=Targets.AddUnit('shlobj');
|
||||
T:=Targets.AddUnit('winver');
|
||||
T:=Targets.AddExampleunit('examples');
|
||||
EndPackage;
|
17
packages/winunits-base/fpmake.pp
Normal file
17
packages/winunits-base/fpmake.pp
Normal file
@ -0,0 +1,17 @@
|
||||
{$mode objfpc}{$H+}
|
||||
program fpmake;
|
||||
|
||||
uses fpmkunit;
|
||||
|
||||
Var
|
||||
T : TTarget;
|
||||
|
||||
begin
|
||||
With Installer do
|
||||
begin
|
||||
{ Base packages }
|
||||
{$i fpmake.inc}
|
||||
Run;
|
||||
end;
|
||||
end.
|
||||
|
3388
packages/winunits-base/src/activex.pp
Normal file
3388
packages/winunits-base/src/activex.pp
Normal file
File diff suppressed because it is too large
Load Diff
29
packages/winunits-base/src/buildwinutilsbase.pp
Normal file
29
packages/winunits-base/src/buildwinutilsbase.pp
Normal file
@ -0,0 +1,29 @@
|
||||
{
|
||||
Dummy unit to compile everything in one go
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
}
|
||||
unit buildwinutilsbase;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
flatsb, winver, mmsystem, comconst, commctrl, comobj,
|
||||
ole2, activex, shellapi, shlobj, oleserver, shfolder, richedit;
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
30
packages/winunits-base/src/comconst.pp
Normal file
30
packages/winunits-base/src/comconst.pp
Normal file
@ -0,0 +1,30 @@
|
||||
{
|
||||
This file is part of the Free Pascal run time library.
|
||||
Copyright (c) 2006 by Florian Klaempfl
|
||||
member of the Free Pascal development team.
|
||||
|
||||
See the file COPYING.FPC, included in this distribution,
|
||||
for details about the copyright.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
**********************************************************************}
|
||||
{$mode objfpc}
|
||||
{$H+}
|
||||
{$inline on}
|
||||
unit comconst;
|
||||
|
||||
interface
|
||||
|
||||
resourcestring
|
||||
SNoMethod = 'Method ''%s'' is not supported by automation object';
|
||||
SOleError = 'OLE error %.8x';
|
||||
SVarNotObject = 'Variant does not reference an automation object';
|
||||
SDCOMNotInstalled = 'DCOM not installed';
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
|
12471
packages/winunits-base/src/commctrl.pp
Normal file
12471
packages/winunits-base/src/commctrl.pp
Normal file
File diff suppressed because it is too large
Load Diff
1060
packages/winunits-base/src/comobj.pp
Normal file
1060
packages/winunits-base/src/comobj.pp
Normal file
File diff suppressed because it is too large
Load Diff
115
packages/winunits-base/src/flatsb.pp
Normal file
115
packages/winunits-base/src/flatsb.pp
Normal file
@ -0,0 +1,115 @@
|
||||
{
|
||||
This file is part of the Free Pascal run time library.
|
||||
Copyright (c) 2007 by the Free Pascal development team
|
||||
member of the Free Pascal development team.
|
||||
|
||||
See the file COPYING.FPC, included in this distribution,
|
||||
for details about the copyright.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
**********************************************************************}
|
||||
{$mode objfpc}
|
||||
{$H+}
|
||||
{$inline on}
|
||||
unit FlatSB;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
ctypes,Windows;
|
||||
|
||||
function InitializeFlatSB(hWnd: HWND): Bool; stdcall;
|
||||
procedure UninitializeFlatSB(hWnd: HWND); stdcall;
|
||||
function FlatSB_GetScrollProp(hwnd:HWND;propIndex : cint;p3 : LPINT):BOOL; stdcall;
|
||||
function FlatSB_SetScrollProp(p1: HWND; index : UINT; newValue: INT_PTR; p4: BOOL):BOOL; stdcall;
|
||||
|
||||
var
|
||||
FlatSB_EnableScrollBar: function(hwnd:HWND;code : cint;p3 : UINT):BOOL; stdcall;
|
||||
FlatSB_ShowScrollBar: function(hwnd:HWND;code : cint;p3 : BOOL):BOOL; stdcall;
|
||||
FlatSB_GetScrollRange: function(hwnd:HWND;code : cint;var p3,p4 : cint):BOOL; stdcall;
|
||||
FlatSB_GetScrollInfo: function(hwnd:HWND;code : cint;var ScrollInfo : TSCROLLINFO):BOOL; stdcall;
|
||||
FlatSB_GetScrollPos: function(hwnd:HWND;code : cint):cint; stdcall;
|
||||
FlatSB_SetScrollPos: function(hWnd:HWND;nBar,nPos:cint;bRedraw:BOOL):cint; stdcall;
|
||||
FlatSB_SetScrollInfo: function(hWnd:HWND;BarFlag:cint;const ScrollInfo:TScrollInfo;Redraw:BOOL):cint; stdcall;
|
||||
FlatSB_SetScrollRange: function(hWnd: HWND; nBar,nMinPos,nMaxPos: cint; bRedraw: BOOL):cint; stdcall;
|
||||
|
||||
implementation
|
||||
|
||||
var
|
||||
Internal_FlatSB_GetScrollProp: function(hwnd:HWND;propIndex : cint;p3 : LPINT):BOOL; stdcall;
|
||||
Internal_FlatSB_SetScrollProp: function(p1: HWND; index : UINT; newValue: INT_PTR; p4: BOOL):BOOL; stdcall;
|
||||
Internal_InitializeFlatSB: function(hWnd: HWND): Bool; stdcall;
|
||||
Internal_UninitializeFlatSB: procedure(hWnd: HWND); stdcall;
|
||||
|
||||
|
||||
function FlatSB_GetScrollProp(hwnd:HWND;propIndex : cint;p3 : LPINT):BOOL; stdcall;
|
||||
begin
|
||||
Result:=Assigned(Internal_FlatSB_GetScrollProp) and Internal_FlatSB_GetScrollProp(hwnd,propIndex, p3);
|
||||
end;
|
||||
|
||||
|
||||
function FlatSB_SetScrollProp(p1: HWND; index : UINT; newValue: INT_PTR; p4: BOOL):BOOL; stdcall;
|
||||
begin
|
||||
Result:=Assigned(Internal_FlatSB_SetScrollProp) and Internal_FlatSB_SetScrollProp(p1,index,newValue,p4);
|
||||
end;
|
||||
|
||||
|
||||
function InitializeFlatSB(hWnd: HWND): Bool; stdcall;
|
||||
begin
|
||||
Result:=Assigned(Internal_InitializeFlatSB) and Internal_InitializeFlatSB(hWnd);
|
||||
end;
|
||||
|
||||
|
||||
procedure UninitializeFlatSB(hWnd: HWND); stdcall;
|
||||
begin
|
||||
if Assigned(Internal_UninitializeFlatSB) then
|
||||
Internal_UninitializeFlatSB(hWnd);
|
||||
end;
|
||||
|
||||
var
|
||||
handle : THandle;
|
||||
begin
|
||||
handle:=GetModuleHandle('comctrl32.dll');
|
||||
if handle<>0 then
|
||||
begin
|
||||
pointer(Internal_InitializeFlatSB):=GetProcAddress(handle,'InitializeFlatSB');
|
||||
pointer(Internal_UninitializeFlatSB):=GetProcAddress(handle,'UninitializeFlatSB');
|
||||
pointer(Internal_FlatSB_GetScrollProp):=GetProcAddress(handle,'FlatSB_GetScrollProp');
|
||||
pointer(Internal_FlatSB_SetScrollProp):=GetProcAddress(handle,'FlatSB_SetScrollProp');
|
||||
|
||||
pointer(FlatSB_EnableScrollBar):=GetProcAddress(handle,'FlatSB_EnableScrollBar');
|
||||
if not(assigned(FlatSB_EnableScrollBar)) then
|
||||
pointer(FlatSB_EnableScrollBar):=pointer(@EnableScrollBar);
|
||||
|
||||
pointer(FlatSB_ShowScrollBar):=GetProcAddress(handle,'FlatSB_ShowScrollBar');
|
||||
if not(assigned(FlatSB_ShowScrollBar)) then
|
||||
pointer(FlatSB_ShowScrollBar):=pointer(@ShowScrollBar);
|
||||
|
||||
pointer(FlatSB_GetScrollRange):=GetProcAddress(handle,'FlatSB_GetScrollRange');
|
||||
if not(assigned(FlatSB_GetScrollRange)) then
|
||||
pointer(FlatSB_GetScrollRange):=pointer(@GetScrollRange);
|
||||
|
||||
pointer(FlatSB_GetScrollInfo):=GetProcAddress(handle,'FlatSB_GetScrollInfo');
|
||||
if not(assigned(FlatSB_GetScrollInfo)) then
|
||||
pointer(FlatSB_GetScrollInfo):=pointer(@GetScrollInfo);
|
||||
|
||||
pointer(FlatSB_GetScrollPos):=GetProcAddress(handle,'FlatSB_GetScrollPos');
|
||||
if not(assigned(FlatSB_GetScrollPos)) then
|
||||
pointer(FlatSB_GetScrollPos):=pointer(@GetScrollPos);
|
||||
|
||||
pointer(FlatSB_SetScrollPos):=GetProcAddress(handle,'FlatSB_SetScrollPos');
|
||||
if not(assigned(FlatSB_SetScrollPos)) then
|
||||
pointer(FlatSB_SetScrollPos):=pointer(@SetScrollPos);
|
||||
|
||||
pointer(FlatSB_SetScrollInfo):=GetProcAddress(handle,'FlatSB_SetScrollInfo');
|
||||
if not(assigned(FlatSB_SetScrollInfo)) then
|
||||
pointer(FlatSB_SetScrollInfo):=pointer(@SetScrollInfo);
|
||||
|
||||
pointer(FlatSB_SetScrollRange):=GetProcAddress(handle,'FlatSB_SetScrollRange');
|
||||
if not(assigned(FlatSB_SetScrollRange)) then
|
||||
pointer(FlatSB_SetScrollRange):=pointer(@SetScrollRange);
|
||||
end;
|
||||
end.
|
2702
packages/winunits-base/src/mmsystem.pp
Normal file
2702
packages/winunits-base/src/mmsystem.pp
Normal file
File diff suppressed because it is too large
Load Diff
92
packages/winunits-base/src/ole2.pp
Normal file
92
packages/winunits-base/src/ole2.pp
Normal file
@ -0,0 +1,92 @@
|
||||
{
|
||||
This file is part of the Free Pascal run time library.
|
||||
Copyright (c) 1999-2000 by the Free Pascal development team.
|
||||
|
||||
Implemtents some stuff of OLE2, tries to be Delphi compatible
|
||||
|
||||
See the file COPYING.FPC, included in this distribution,
|
||||
for details about the copyright.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
**********************************************************************}
|
||||
{$MODE OBJFPC}
|
||||
unit ole2;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
windows;
|
||||
|
||||
const
|
||||
GUID_NULL: TGUID = (D1:$00000000;D2:$0000;D3:$0000;D4:($00,$00,$00,$00,$00,$00,$00,$00));
|
||||
IID_IUnknown: TGUID = (D1:$00000000;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_IClassFactory: TGUID = (D1:$00000001;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_IMarshal: TGUID = (D1:$00000003;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_IMalloc: TGUID = (D1:$00000002;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_IStdMarshalInfo: TGUID = (D1:$00000018;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_IExternalConnection: TGUID = (D1:$00000019;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_IEnumUnknown: TGUID = (D1:$00000100;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_IBindCtx: TGUID = (D1:$0000000E;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_IEnumMoniker: TGUID = (D1:$00000102;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_IRunnableObject: TGUID = (D1:$00000126;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_IRunningObjectTable: TGUID = (D1:$00000010;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_IPersist: TGUID = (D1:$0000010C;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_IPersistStream: TGUID = (D1:$00000109;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_IMoniker: TGUID = (D1:$0000000F;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_IEnumString: TGUID = (D1:$00000101;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_IStream: TGUID = (D1:$0000000C;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_IEnumStatStg: TGUID = (D1:$0000000D;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_IStorage: TGUID = (D1:$0000000B;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_IPersistFile: TGUID = (D1:$0000010B;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_IPersistStorage: TGUID = (D1:$0000010A;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_ILockBytes: TGUID = (D1:$0000000A;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_IEnumFormatEtc: TGUID = (D1:$00000103;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_IEnumStatData: TGUID = (D1:$00000105;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_IRootStorage: TGUID = (D1:$00000012;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_IAdviseSink: TGUID = (D1:$0000010F;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_IAdviseSink2: TGUID = (D1:$00000125;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_IDataObject: TGUID = (D1:$0000010E;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_IDataAdviseHolder: TGUID = (D1:$00000110;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_IMessageFilter: TGUID = (D1:$00000016;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_IRpcChannelBuffer: TGUID = (D1:$D5F56B60;D2:$593B;D3:$101A;D4:($B5,$69,$08,$00,$2B,$2D,$BF,$7A));
|
||||
IID_IRpcProxyBuffer: TGUID = (D1:$D5F56A34;D2:$593B;D3:$101A;D4:($B5,$69,$08,$00,$2B,$2D,$BF,$7A));
|
||||
IID_IRpcStubBuffer: TGUID = (D1:$D5F56AFC;D2:$593B;D3:$101A;D4:($B5,$69,$08,$00,$2B,$2D,$BF,$7A));
|
||||
IID_IPSFactoryBuffer: TGUID = (D1:$D5F569D0;D2:$593B;D3:$101A;D4:($B5,$69,$08,$00,$2B,$2D,$BF,$7A));
|
||||
IID_ICreateTypeInfo: TGUID = (D1:$00020405;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_ICreateTypeLib: TGUID = (D1:$00020406;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_IDispatch: TGUID = (D1:$00020400;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_IEnumVariant: TGUID = (D1:$00020404;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_ITypeComp: TGUID = (D1:$00020403;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_ITypeInfo: TGUID = (D1:$00020401;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_ITypeLib: TGUID = (D1:$00020402;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_IErrorInfo: TGUID = (D1:$1CF2B120;D2:$547D;D3:$101B;D4:($8E,$65,$08,$00,$2B,$2B,$D1,$19));
|
||||
IID_ICreateErrorInfo: TGUID = (D1:$22F03340;D2:$547D;D3:$101B;D4:($8E,$65,$08,$00,$2B,$2B,$D1,$19));
|
||||
IID_ISupportErrorInfo: TGUID = (D1:$DF0B3D60;D2:$548F;D3:$101B;D4:($8E,$65,$08,$00,$2B,$2B,$D1,$19));
|
||||
IID_IOleAdviseHolder: TGUID = (D1:$00000111;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_IOleCache: TGUID = (D1:$0000011E;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_IOleCache2: TGUID = (D1:$00000128;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_IOleCacheControl: TGUID = (D1:$00000129;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_IParseDisplayName: TGUID = (D1:$0000011A;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_IOleContainer: TGUID = (D1:$0000011B;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_IOleClientSite: TGUID = (D1:$00000118;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_IOleObject: TGUID = (D1:$00000112;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_IOleWindow: TGUID = (D1:$00000114;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_IOleLink: TGUID = (D1:$0000011D;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_IOleItemContainer: TGUID = (D1:$0000011C;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_IOleInPlaceUIWindow: TGUID = (D1:$00000115;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_IOleInPlaceActiveObject: TGUID = (D1:$00000117;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_IOleInPlaceFrame: TGUID = (D1:$00000116;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_IOleInPlaceObject: TGUID = (D1:$00000113;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_IOleInPlaceSite: TGUID = (D1:$00000119;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_IViewObject: TGUID = (D1:$0000010D;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_IViewObject2: TGUID = (D1:$00000127;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_IDropSource: TGUID = (D1:$00000121;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_IDropTarget: TGUID = (D1:$00000122;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
IID_IEnumOleVerb: TGUID = (D1:$00000104;D2:$0000;D3:$0000;D4:($C0,$00,$00,$00,$00,$00,$00,$46));
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
205
packages/winunits-base/src/oleserver.pp
Normal file
205
packages/winunits-base/src/oleserver.pp
Normal file
@ -0,0 +1,205 @@
|
||||
{$mode objfpc}
|
||||
unit OleServer;
|
||||
|
||||
interface
|
||||
|
||||
uses Windows, Messages, ActiveX, SysUtils, Classes, ComObj;
|
||||
|
||||
type
|
||||
TVariantArray = Array of OleVariant;
|
||||
TOleServer = class;
|
||||
TConnectKind = (ckRunningOrNew,
|
||||
ckNewInstance,
|
||||
ckRunningInstance,
|
||||
ckRemote,
|
||||
ckAttachToInterface);
|
||||
|
||||
TServerEventDispatch = class(TObject, IUnknown, IDispatch)
|
||||
private
|
||||
FServer : TOleServer;
|
||||
protected
|
||||
function QueryInterface(const IID: TGUID; out Obj): HResult; stdcall;
|
||||
function _AddRef: Integer; stdcall;
|
||||
function _Release: Integer; stdcall;
|
||||
function GetTypeInfoCount(out Count: Integer): HResult; stdcall;
|
||||
function GetTypeInfo(Index, LocaleID: Integer; out TypeInfo): HResult; stdcall;
|
||||
function GetIDsOfNames(const IID: TGUID; Names: Pointer;
|
||||
NameCount, LocaleID: Integer; DispIDs: Pointer): HResult; stdcall;
|
||||
function Invoke(DispID: Integer; const IID: TGUID; LocaleID: Integer;
|
||||
Flags: Word; var Params; VarResult, ExcepInfo, ArgErr: Pointer): HResult; stdcall;
|
||||
property Server: TOleServer read FServer;
|
||||
function ServerDisconnect :Boolean;
|
||||
public
|
||||
constructor Create(aServer: TOleServer);
|
||||
end;
|
||||
|
||||
PServerData = ^TServerData;
|
||||
TServerData = record
|
||||
ClassID: TGUID;
|
||||
IntfIID: TGUID;
|
||||
EventIID: TGUID;
|
||||
LicenseKey: Pointer;
|
||||
Version: Integer;
|
||||
InstanceCount: Integer;
|
||||
end;
|
||||
|
||||
TOleServer = class(TComponent, IUnknown)
|
||||
private
|
||||
FRemoteMachineName: string;
|
||||
FEventDispatch: TServerEventDispatch;
|
||||
FServerData: PServerData;
|
||||
protected
|
||||
function QueryInterface(const IID: TGUID; out Obj): HResult; stdcall; override;
|
||||
function _AddRef: Integer; stdcall;
|
||||
function _Release: Integer; stdcall;
|
||||
|
||||
procedure Loaded; override;
|
||||
procedure InitServerData; virtual; abstract;
|
||||
|
||||
function GetServer: IUnknown; virtual;
|
||||
|
||||
procedure ConnectEvents(const Obj: IUnknown);
|
||||
procedure DisconnectEvents(const Obj: Iunknown);
|
||||
procedure InvokeEvent(DispID: TDispID; var Params: TVariantArray); virtual;
|
||||
|
||||
function GetConnectKind: TConnectKind;
|
||||
procedure SetConnectKind(ck: TConnectKind);
|
||||
|
||||
function GetAutoConnect: Boolean;
|
||||
procedure SetAutoConnect(flag: Boolean);
|
||||
|
||||
property ServerData: PServerData read FServerData write FServerData;
|
||||
property EventDispatch: TServerEventDispatch read FEventDispatch write FEventDispatch;
|
||||
|
||||
public
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
procedure Connect; virtual; abstract;
|
||||
procedure Disconnect; virtual; abstract;
|
||||
|
||||
published
|
||||
property AutoConnect: Boolean read GetAutoConnect write SetAutoConnect;
|
||||
property ConnectKind: TConnectKind read GetConnectKind write SetConnectKind;
|
||||
property RemoteMachineName: string read FRemoteMachineName write FRemoteMachineName;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
function TServerEventDispatch.QueryInterface(const IID: TGUID; out Obj): HResult; stdcall;
|
||||
begin
|
||||
end;
|
||||
|
||||
|
||||
function TServerEventDispatch._AddRef: Integer; stdcall;
|
||||
begin
|
||||
end;
|
||||
|
||||
|
||||
function TServerEventDispatch._Release: Integer; stdcall;
|
||||
begin
|
||||
end;
|
||||
|
||||
|
||||
function TServerEventDispatch.GetTypeInfoCount(out Count: Integer): HResult; stdcall;
|
||||
begin
|
||||
end;
|
||||
|
||||
|
||||
function TServerEventDispatch.GetTypeInfo(Index, LocaleID: Integer; out TypeInfo): HResult; stdcall;
|
||||
begin
|
||||
end;
|
||||
|
||||
|
||||
function TServerEventDispatch.GetIDsOfNames(const IID: TGUID; Names: Pointer;
|
||||
NameCount, LocaleID: Integer; DispIDs: Pointer): HResult; stdcall;
|
||||
begin
|
||||
end;
|
||||
|
||||
|
||||
function TServerEventDispatch.Invoke(DispID: Integer; const IID: TGUID; LocaleID: Integer;
|
||||
Flags: Word; var Params; VarResult, ExcepInfo, ArgErr: Pointer): HResult; stdcall;
|
||||
begin
|
||||
end;
|
||||
|
||||
|
||||
function TServerEventDispatch.ServerDisconnect :Boolean;
|
||||
begin
|
||||
end;
|
||||
|
||||
|
||||
constructor TServerEventDispatch.Create(aServer: TOleServer);
|
||||
begin
|
||||
end;
|
||||
|
||||
|
||||
function TOleServer.QueryInterface(const IID: TGUID; out Obj): HResult; stdcall;
|
||||
begin
|
||||
end;
|
||||
|
||||
|
||||
function TOleServer._AddRef: Integer; stdcall;
|
||||
begin
|
||||
end;
|
||||
|
||||
|
||||
function TOleServer._Release: Integer; stdcall;
|
||||
begin
|
||||
end;
|
||||
|
||||
|
||||
procedure TOleServer.Loaded;
|
||||
begin
|
||||
end;
|
||||
|
||||
|
||||
function TOleServer.GetServer: IUnknown;
|
||||
begin
|
||||
end;
|
||||
|
||||
|
||||
procedure TOleServer.ConnectEvents(const Obj: IUnknown);
|
||||
begin
|
||||
end;
|
||||
|
||||
|
||||
procedure TOleServer.DisconnectEvents(const Obj: Iunknown);
|
||||
begin
|
||||
end;
|
||||
|
||||
|
||||
procedure TOleServer.InvokeEvent(DispID: TDispID; var Params: TVariantArray);
|
||||
begin
|
||||
end;
|
||||
|
||||
|
||||
function TOleServer.GetConnectKind: TConnectKind;
|
||||
begin
|
||||
end;
|
||||
|
||||
|
||||
procedure TOleServer.SetConnectKind(ck: TConnectKind);
|
||||
begin
|
||||
end;
|
||||
|
||||
|
||||
function TOleServer.GetAutoConnect: Boolean;
|
||||
begin
|
||||
end;
|
||||
|
||||
|
||||
procedure TOleServer.SetAutoConnect(flag: Boolean);
|
||||
begin
|
||||
end;
|
||||
|
||||
|
||||
constructor TOleServer.Create(AOwner: TComponent);
|
||||
begin
|
||||
end;
|
||||
|
||||
|
||||
destructor TOleServer.Destroy;
|
||||
begin
|
||||
end;
|
||||
|
||||
|
||||
end.
|
632
packages/winunits-base/src/richedit.pp
Normal file
632
packages/winunits-base/src/richedit.pp
Normal file
@ -0,0 +1,632 @@
|
||||
{ Converted by H2Pas from richedit.h }
|
||||
unit richedit;
|
||||
|
||||
{$mode objfpc}
|
||||
{$calling stdcall}
|
||||
|
||||
interface
|
||||
|
||||
uses Messages, Windows;
|
||||
|
||||
{$IFDEF FPC}
|
||||
{$PACKRECORDS C}
|
||||
{$ENDIF}
|
||||
|
||||
{$ifdef UNICODE }
|
||||
const
|
||||
RICHEDIT_CLASS = 'RichEdit20W';
|
||||
{$else}
|
||||
const
|
||||
RICHEDIT_CLASS = 'RichEdit20A';
|
||||
{$endif}
|
||||
|
||||
const
|
||||
RICHEDIT_CLASS10A = 'RICHEDIT';
|
||||
CF_RTF = 'Rich Text Format';
|
||||
CF_RTFNOOBJS = 'Rich Text Format Without Objects';
|
||||
CF_RETEXTOBJ = 'RichEdit Text and Objects';
|
||||
CFM_BOLD = 1;
|
||||
CFM_ITALIC = 2;
|
||||
CFM_UNDERLINE = 4;
|
||||
CFM_STRIKEOUT = 8;
|
||||
CFM_PROTECTED = 16;
|
||||
CFM_LINK = 32;
|
||||
CFM_SIZE = $80000000;
|
||||
CFM_COLOR = $40000000;
|
||||
CFM_FACE = $20000000;
|
||||
CFM_OFFSET = $10000000;
|
||||
CFM_CHARSET = $08000000;
|
||||
CFM_SUBSCRIPT = $00030000;
|
||||
CFM_SUPERSCRIPT = $00030000;
|
||||
CFM_EFFECTS = (((((CFM_BOLD or CFM_ITALIC) or CFM_UNDERLINE) or CFM_COLOR) or CFM_STRIKEOUT) or CFE_PROTECTED) or CFM_LINK;
|
||||
CFE_BOLD = 1;
|
||||
CFE_ITALIC = 2;
|
||||
CFE_UNDERLINE = 4;
|
||||
CFE_STRIKEOUT = 8;
|
||||
CFE_PROTECTED = 16;
|
||||
CFE_AUTOCOLOR = $40000000;
|
||||
CFE_SUBSCRIPT = $00010000;
|
||||
CFE_SUPERSCRIPT = $00020000;
|
||||
IMF_FORCENONE = 1;
|
||||
IMF_FORCEENABLE = 2;
|
||||
IMF_FORCEDISABLE = 4;
|
||||
IMF_CLOSESTATUSWINDOW = 8;
|
||||
IMF_VERTICAL = 32;
|
||||
IMF_FORCEACTIVE = 64;
|
||||
IMF_FORCEINACTIVE = 128;
|
||||
IMF_FORCEREMEMBER = 256;
|
||||
SEL_EMPTY = 0;
|
||||
SEL_TEXT = 1;
|
||||
SEL_OBJECT = 2;
|
||||
SEL_MULTICHAR = 4;
|
||||
SEL_MULTIOBJECT = 8;
|
||||
MAX_TAB_STOPS = 32;
|
||||
PFM_ALIGNMENT = 8;
|
||||
PFM_NUMBERING = 32;
|
||||
PFM_OFFSET = 4;
|
||||
PFM_OFFSETINDENT = $80000000;
|
||||
PFM_RIGHTINDENT = 2;
|
||||
PFM_STARTINDENT = 1;
|
||||
PFM_TABSTOPS = 16;
|
||||
PFM_BORDER = 2048;
|
||||
PFM_LINESPACING = 256;
|
||||
PFM_NUMBERINGSTART = 32768;
|
||||
PFM_NUMBERINGSTYLE = 8192;
|
||||
PFM_NUMBERINGTAB = 16384;
|
||||
PFM_SHADING = 4096;
|
||||
PFM_SPACEAFTER = 128;
|
||||
PFM_SPACEBEFORE = 64;
|
||||
PFM_STYLE = 1024;
|
||||
PFM_DONOTHYPHEN = 4194304;
|
||||
PFM_KEEP = 131072;
|
||||
PFM_KEEPNEXT = 262144;
|
||||
PFM_NOLINENUMBER = 1048576;
|
||||
PFM_NOWIDOWCONTROL = 2097152;
|
||||
PFM_PAGEBREAKBEFORE = 524288;
|
||||
PFM_RTLPARA = 65536;
|
||||
PFM_SIDEBYSIDE = 8388608;
|
||||
PFM_TABLE = 1073741824;
|
||||
PFN_BULLET = 1;
|
||||
PFE_DONOTHYPHEN = 64;
|
||||
PFE_KEEP = 2;
|
||||
PFE_KEEPNEXT = 4;
|
||||
PFE_NOLINENUMBER = 16;
|
||||
PFE_NOWIDOWCONTROL = 32;
|
||||
PFE_PAGEBREAKBEFORE = 8;
|
||||
PFE_RTLPARA = 1;
|
||||
PFE_SIDEBYSIDE = 128;
|
||||
PFE_TABLE = 16384;
|
||||
PFA_LEFT = 1;
|
||||
PFA_RIGHT = 2;
|
||||
PFA_CENTER = 3;
|
||||
PFA_JUSTIFY = 4;
|
||||
PFA_FULL_INTERWORD = 4;
|
||||
SF_TEXT = 1;
|
||||
SF_RTF = 2;
|
||||
SF_RTFNOOBJS = 3;
|
||||
SF_TEXTIZED = 4;
|
||||
SF_UNICODE = 16;
|
||||
SF_USECODEPAGE = 32;
|
||||
SF_NCRFORNONASCII = 64;
|
||||
SF_RTFVAL = $0700;
|
||||
SFF_PWD = $0800;
|
||||
SFF_KEEPDOCINFO = $1000;
|
||||
SFF_PERSISTVIEWSCALE = $2000;
|
||||
SFF_PLAINRTF = $4000;
|
||||
SFF_SELECTION = $8000;
|
||||
WB_CLASSIFY = 3;
|
||||
WB_MOVEWORDLEFT = 4;
|
||||
WB_MOVEWORDRIGHT = 5;
|
||||
WB_LEFTBREAK = 6;
|
||||
WB_RIGHTBREAK = 7;
|
||||
WB_MOVEWORDPREV = 4;
|
||||
WB_MOVEWORDNEXT = 5;
|
||||
WB_PREVBREAK = 6;
|
||||
WB_NEXTBREAK = 7;
|
||||
WBF_WORDWRAP = 16;
|
||||
WBF_WORDBREAK = 32;
|
||||
WBF_OVERFLOW = 64;
|
||||
WBF_LEVEL1 = 128;
|
||||
WBF_LEVEL2 = 256;
|
||||
WBF_CUSTOM = 512;
|
||||
ES_DISABLENOSCROLL = 8192;
|
||||
ES_EX_NOCALLOLEINIT = 16777216;
|
||||
ES_NOIME = 524288;
|
||||
ES_NOOLEDRAGDROP = 8;
|
||||
ES_SAVESEL = 32768;
|
||||
ES_SELECTIONBAR = 16777216;
|
||||
ES_SELFIME = 262144;
|
||||
ES_SUNKEN = 16384;
|
||||
ES_VERTICAL = 4194304;
|
||||
EM_CANPASTE = WM_USER+50;
|
||||
EM_DISPLAYBAND = WM_USER+51;
|
||||
EM_EXGETSEL = WM_USER+52;
|
||||
EM_EXLIMITTEXT = WM_USER+53;
|
||||
EM_EXLINEFROMCHAR = WM_USER+54;
|
||||
EM_EXSETSEL = WM_USER+55;
|
||||
EM_FINDTEXT = WM_USER+56;
|
||||
EM_FORMATRANGE = WM_USER+57;
|
||||
EM_GETCHARFORMAT = WM_USER+58;
|
||||
EM_GETEVENTMASK = WM_USER+59;
|
||||
EM_GETOLEINTERFACE = WM_USER+60;
|
||||
EM_GETPARAFORMAT = WM_USER+61;
|
||||
EM_GETSELTEXT = WM_USER+62;
|
||||
EM_HIDESELECTION = WM_USER+63;
|
||||
EM_PASTESPECIAL = WM_USER+64;
|
||||
EM_REQUESTRESIZE = WM_USER+65;
|
||||
EM_SELECTIONTYPE = WM_USER+66;
|
||||
EM_SETBKGNDCOLOR = WM_USER+67;
|
||||
EM_SETCHARFORMAT = WM_USER+68;
|
||||
EM_SETEVENTMASK = WM_USER+69;
|
||||
EM_SETOLECALLBACK = WM_USER+70;
|
||||
EM_SETPARAFORMAT = WM_USER+71;
|
||||
EM_SETTARGETDEVICE = WM_USER+72;
|
||||
EM_STREAMIN = WM_USER+73;
|
||||
EM_STREAMOUT = WM_USER+74;
|
||||
EM_GETTEXTRANGE = WM_USER+75;
|
||||
EM_FINDWORDBREAK = WM_USER+76;
|
||||
EM_SETOPTIONS = WM_USER+77;
|
||||
EM_GETOPTIONS = WM_USER+78;
|
||||
EM_FINDTEXTEX = WM_USER+79;
|
||||
EM_GETWORDBREAKPROCEX = WM_USER+80;
|
||||
EM_SETWORDBREAKPROCEX = WM_USER+81;
|
||||
{ RichEdit 2.0 messages }
|
||||
EM_SETUNDOLIMIT = WM_USER+82;
|
||||
EM_REDO = WM_USER+84;
|
||||
EM_CANREDO = WM_USER+85;
|
||||
EM_GETUNDONAME = WM_USER+86;
|
||||
EM_GETREDONAME = WM_USER+87;
|
||||
EM_STOPGROUPTYPING = WM_USER+88;
|
||||
EM_SETTEXTMODE = WM_USER+89;
|
||||
EM_GETTEXTMODE = WM_USER+90;
|
||||
EM_AUTOURLDETECT = WM_USER+91;
|
||||
EM_GETAUTOURLDETECT = WM_USER+92;
|
||||
EM_SETPALETTE = WM_USER+93;
|
||||
EM_GETTEXTEX = WM_USER+94;
|
||||
EM_GETTEXTLENGTHEX = WM_USER+95;
|
||||
EM_SHOWSCROLLBAR = WM_USER+96;
|
||||
EM_SETTEXTEX = WM_USER+97;
|
||||
EM_SETPUNCTUATION = WM_USER+100;
|
||||
EM_GETPUNCTUATION = WM_USER+101;
|
||||
EM_SETWORDWRAPMODE = WM_USER+102;
|
||||
EM_GETWORDWRAPMODE = WM_USER+103;
|
||||
EM_SETIMECOLOR = WM_USER+104;
|
||||
EM_GETIMECOLOR = WM_USER+105;
|
||||
EM_SETIMEOPTIONS = WM_USER+106;
|
||||
EM_GETIMEOPTIONS = WM_USER+107;
|
||||
EM_SETLANGOPTIONS = WM_USER+120;
|
||||
EM_GETLANGOPTIONS = WM_USER+121;
|
||||
EM_GETIMECOMPMODE = WM_USER+122;
|
||||
EM_FINDTEXTW = WM_USER+123;
|
||||
EM_FINDTEXTEXW = WM_USER+124;
|
||||
EM_RECONVERSION = WM_USER+125;
|
||||
EM_SETBIDIOPTIONS = WM_USER+200;
|
||||
EM_GETBIDIOPTIONS = WM_USER+201;
|
||||
EM_SETTYPOGRAPHYOPTIONS = WM_USER+202;
|
||||
EM_GETTYPOGRAPHYOPTIONS = WM_USER+203;
|
||||
EM_SETEDITSTYLE = WM_USER+204;
|
||||
EM_GETEDITSTYLE = WM_USER+205;
|
||||
EM_GETSCROLLPOS = WM_USER+221;
|
||||
EM_SETSCROLLPOS = WM_USER+222;
|
||||
EM_SETFONTSIZE = WM_USER+223;
|
||||
EM_GETZOOM = WM_USER+224;
|
||||
EM_SETZOOM = WM_USER+225;
|
||||
EN_CORRECTTEXT = 1797;
|
||||
EN_DROPFILES = 1795;
|
||||
EN_IMECHANGE = 1799;
|
||||
EN_LINK = 1803;
|
||||
EN_MSGFILTER = 1792;
|
||||
EN_OLEOPFAILED = 1801;
|
||||
EN_PROTECTED = 1796;
|
||||
EN_REQUESTRESIZE = 1793;
|
||||
EN_SAVECLIPBOARD = 1800;
|
||||
EN_SELCHANGE = 1794;
|
||||
EN_STOPNOUNDO = 1798;
|
||||
ENM_NONE = 0;
|
||||
ENM_CHANGE = 1;
|
||||
ENM_CORRECTTEXT = 4194304;
|
||||
ENM_DRAGDROPDONE = 16;
|
||||
ENM_DROPFILES = 1048576;
|
||||
ENM_IMECHANGE = 8388608;
|
||||
ENM_KEYEVENTS = 65536;
|
||||
ENM_LANGCHANGE = 16777216;
|
||||
ENM_LINK = 67108864;
|
||||
ENM_MOUSEEVENTS = 131072;
|
||||
ENM_OBJECTPOSITIONS = 33554432;
|
||||
ENM_PROTECTED = 2097152;
|
||||
ENM_REQUESTRESIZE = 262144;
|
||||
ENM_SCROLL = 4;
|
||||
ENM_SCROLLEVENTS = 8;
|
||||
ENM_SELCHANGE = 524288;
|
||||
ENM_UPDATE = 2;
|
||||
ECO_AUTOWORDSELECTION = 1;
|
||||
ECO_AUTOVSCROLL = 64;
|
||||
ECO_AUTOHSCROLL = 128;
|
||||
ECO_NOHIDESEL = 256;
|
||||
ECO_READONLY = 2048;
|
||||
ECO_WANTRETURN = 4096;
|
||||
ECO_SAVESEL = $8000;
|
||||
ECO_SELECTIONBAR = $1000000;
|
||||
ECO_VERTICAL = $400000;
|
||||
ECOOP_SET = 1;
|
||||
ECOOP_OR = 2;
|
||||
ECOOP_AND = 3;
|
||||
ECOOP_XOR = 4;
|
||||
SCF_DEFAULT = 0;
|
||||
SCF_SELECTION = 1;
|
||||
SCF_WORD = 2;
|
||||
SCF_ALL = 4;
|
||||
SCF_USEUIRULES = 8;
|
||||
TM_PLAINTEXT = 1;
|
||||
TM_RICHTEXT = 2;
|
||||
TM_SINGLELEVELUNDO = 4;
|
||||
TM_MULTILEVELUNDO = 8;
|
||||
TM_SINGLECODEPAGE = 16;
|
||||
TM_MULTICODEPAGE = 32;
|
||||
GT_DEFAULT = 0;
|
||||
GT_USECRLF = 1;
|
||||
yHeightCharPtsMost = 1638;
|
||||
lDefaultTab = 720;
|
||||
FT_MATCHCASE = 4;
|
||||
FT_WHOLEWORD = 2;
|
||||
|
||||
type
|
||||
|
||||
_charformat = record
|
||||
cbSize : UINT;
|
||||
dwMask : DWORD;
|
||||
dwEffects : DWORD;
|
||||
yHeight : LONG;
|
||||
yOffset : LONG;
|
||||
crTextColor : COLORREF;
|
||||
bCharSet : BYTE;
|
||||
bPitchAndFamily : BYTE;
|
||||
szFaceName : array[0..(LF_FACESIZE)-1] of char;
|
||||
end;
|
||||
CHARFORMATA = _charformat;
|
||||
TCHARFORMATA = _charformat;
|
||||
|
||||
_charformatw = record
|
||||
cbSize : UINT;
|
||||
dwMask : DWORD;
|
||||
dwEffects : DWORD;
|
||||
yHeight : LONG;
|
||||
yOffset : LONG;
|
||||
crTextColor : COLORREF;
|
||||
bCharSet : BYTE;
|
||||
bPitchAndFamily : BYTE;
|
||||
szFaceName : array[0..(LF_FACESIZE)-1] of WCHAR;
|
||||
end;
|
||||
CHARFORMATW = _charformatw;
|
||||
TCHARFORMATW = _charformatw;
|
||||
|
||||
_charformat2a = record
|
||||
cbSize : UINT;
|
||||
dwMask : DWORD;
|
||||
dwEffects : DWORD;
|
||||
yHeight : LONG;
|
||||
yOffset : LONG;
|
||||
crTextColor : COLORREF;
|
||||
bCharSet : BYTE;
|
||||
bPitchAndFamily : BYTE;
|
||||
szFaceName : array[0..(LF_FACESIZE)-1] of char;
|
||||
wWeight : WORD;
|
||||
sSpacing : SHORT;
|
||||
crBackColor : COLORREF;
|
||||
lcid : LCID;
|
||||
dwReserved : DWORD;
|
||||
sStyle : SHORT;
|
||||
wKerning : WORD;
|
||||
bUnderlineType : BYTE;
|
||||
bAnimation : BYTE;
|
||||
bRevAuthor : BYTE;
|
||||
end;
|
||||
CHARFORMAT2A = _charformat2a;
|
||||
TCHARFORMAT2A = _charformat2a;
|
||||
|
||||
_charformat2w = record
|
||||
cbSize : UINT;
|
||||
dwMask : DWORD;
|
||||
dwEffects : DWORD;
|
||||
yHeight : LONG;
|
||||
yOffset : LONG;
|
||||
crTextColor : COLORREF;
|
||||
bCharSet : BYTE;
|
||||
bPitchAndFamily : BYTE;
|
||||
szFaceName : array[0..(LF_FACESIZE)-1] of WCHAR;
|
||||
wWeight : WORD;
|
||||
sSpacing : SHORT;
|
||||
crBackColor : COLORREF;
|
||||
lcid : LCID;
|
||||
dwReserved : DWORD;
|
||||
sStyle : SHORT;
|
||||
wKerning : WORD;
|
||||
bUnderlineType : BYTE;
|
||||
bAnimation : BYTE;
|
||||
bRevAuthor : BYTE;
|
||||
end;
|
||||
CHARFORMAT2W = _charformat2w;
|
||||
TCHARFORMAT2W = _charformat2w;
|
||||
|
||||
_charrange = record
|
||||
cpMin : LONG;
|
||||
cpMax : LONG;
|
||||
end;
|
||||
CHARRANGE = _charrange;
|
||||
TCHARRANGE = _charrange;
|
||||
|
||||
_compcolor = record
|
||||
crText : COLORREF;
|
||||
crBackground : COLORREF;
|
||||
dwEffects : DWORD;
|
||||
end;
|
||||
COMPCOLOR = _compcolor;
|
||||
TCOMPCOLOR = _compcolor;
|
||||
|
||||
EDITSTREAMCALLBACK = function (dwCookie:PDWORD; pbBuff:LPBYTE; cb:LONG; var pcb:LONG):DWORD;
|
||||
|
||||
_editstream = record
|
||||
dwCookie : DWORD;
|
||||
dwError : DWORD;
|
||||
pfnCallback : EDITSTREAMCALLBACK;
|
||||
end;
|
||||
EDITSTREAM = _editstream;
|
||||
TEDITSTREAM = _editstream;
|
||||
|
||||
_encorrecttext = record
|
||||
nmhdr : NMHDR;
|
||||
chrg : CHARRANGE;
|
||||
seltyp : WORD;
|
||||
end;
|
||||
ENCORRECTTEXT = _encorrecttext;
|
||||
TENCORRECTTEXT = _encorrecttext;
|
||||
|
||||
_endropfiles = record
|
||||
nmhdr : NMHDR;
|
||||
hDrop : HANDLE;
|
||||
cp : LONG;
|
||||
fProtected : BOOL;
|
||||
end;
|
||||
ENDROPFILES = _endropfiles;
|
||||
TENDROPFILES = _endropfiles;
|
||||
|
||||
_enlink = record
|
||||
nmhdr : NMHDR;
|
||||
msg : UINT;
|
||||
wParam : WPARAM;
|
||||
lParam : LPARAM;
|
||||
chrg : CHARRANGE;
|
||||
end;
|
||||
ENLINK = _enlink;
|
||||
TENLINK = _enlink;
|
||||
|
||||
ENOLEOPFAILED = record
|
||||
nmhdr : NMHDR;
|
||||
iob : LONG;
|
||||
lOper : LONG;
|
||||
hr : HRESULT;
|
||||
end;
|
||||
|
||||
_enprotected = record
|
||||
nmhdr : NMHDR;
|
||||
msg : UINT;
|
||||
wParam : WPARAM;
|
||||
lParam : LPARAM;
|
||||
chrg : CHARRANGE;
|
||||
end;
|
||||
ENPROTECTED = _enprotected;
|
||||
TENPROTECTED = _enprotected;
|
||||
LPENPROTECTED = ^_enprotected;
|
||||
|
||||
_ensaveclipboard = record
|
||||
nmhdr : NMHDR;
|
||||
cObjectCount : LONG;
|
||||
cch : LONG;
|
||||
end;
|
||||
ENSAVECLIPBOARD = _ensaveclipboard;
|
||||
TENSAVECLIPBOARD = _ensaveclipboard;
|
||||
|
||||
_findtextA = record
|
||||
chrg : CHARRANGE;
|
||||
lpstrText : LPSTR;
|
||||
end;
|
||||
FINDTEXTA = _findtextA;
|
||||
TFINDTEXTA = _findtextA;
|
||||
|
||||
_findtextW = record
|
||||
chrg : CHARRANGE;
|
||||
lpstrText : LPWSTR;
|
||||
end;
|
||||
FINDTEXTW = _findtextW;
|
||||
TFINDTEXTW = _findtextW;
|
||||
|
||||
_findtextexA = record
|
||||
chrg : CHARRANGE;
|
||||
lpstrText : LPSTR;
|
||||
chrgText : CHARRANGE;
|
||||
end;
|
||||
FINDTEXTEXA = _findtextexA;
|
||||
TFINDTEXTEXA = _findtextexA;
|
||||
|
||||
_findtextexW = record
|
||||
chrg : CHARRANGE;
|
||||
lpstrText : LPWSTR;
|
||||
chrgText : CHARRANGE;
|
||||
end;
|
||||
FINDTEXTEXW = _findtextexW;
|
||||
TFINDTEXTEXW = _findtextexW;
|
||||
|
||||
_formatrange = record
|
||||
hdc : HDC;
|
||||
hdcTarget : HDC;
|
||||
rc : RECT;
|
||||
rcPage : RECT;
|
||||
chrg : CHARRANGE;
|
||||
end;
|
||||
FORMATRANGE = _formatrange;
|
||||
TFORMATRANGE = _formatrange;
|
||||
|
||||
_msgfilter = record
|
||||
nmhdr : NMHDR;
|
||||
msg : UINT;
|
||||
wParam : WPARAM;
|
||||
lParam : LPARAM;
|
||||
end;
|
||||
MSGFILTER = _msgfilter;
|
||||
TMSGFILTER = _msgfilter;
|
||||
|
||||
TReqSize = record
|
||||
nmhdr: TNMHdr;
|
||||
rc: TRect;
|
||||
end;
|
||||
PReqSize = ^TReqSize;
|
||||
|
||||
_paraformat = record
|
||||
cbSize : UINT;
|
||||
dwMask : DWORD;
|
||||
wNumbering : WORD;
|
||||
wReserved : WORD;
|
||||
dxStartIndent : LONG;
|
||||
dxRightIndent : LONG;
|
||||
dxOffset : LONG;
|
||||
wAlignment : WORD;
|
||||
cTabCount : SHORT;
|
||||
rgxTabs : array[0..(MAX_TAB_STOPS)-1] of LONG;
|
||||
end;
|
||||
PARAFORMAT = _paraformat;
|
||||
TParaFormat = _paraformat;
|
||||
|
||||
_paraformat2 = record
|
||||
cbSize : UINT;
|
||||
dwMask : DWORD;
|
||||
wNumbering : WORD;
|
||||
wEffects : WORD;
|
||||
dxStartIndent : LONG;
|
||||
dxRightIndent : LONG;
|
||||
dxOffset : LONG;
|
||||
wAlignment : WORD;
|
||||
cTabCount : SHORT;
|
||||
rgxTabs : array[0..(MAX_TAB_STOPS)-1] of LONG;
|
||||
dySpaceBefore : LONG;
|
||||
dySpaceAfter : LONG;
|
||||
dyLineSpacing : LONG;
|
||||
sStype : SHORT;
|
||||
bLineSpacingRule : BYTE;
|
||||
bOutlineLevel : BYTE;
|
||||
wShadingWeight : WORD;
|
||||
wShadingStyle : WORD;
|
||||
wNumberingStart : WORD;
|
||||
wNumberingStyle : WORD;
|
||||
wNumberingTab : WORD;
|
||||
wBorderSpace : WORD;
|
||||
wBorderWidth : WORD;
|
||||
wBorders : WORD;
|
||||
end;
|
||||
PARAFORMAT2 = _paraformat2;
|
||||
TPARAFORMAT2 = _paraformat2;
|
||||
|
||||
_selchange = record
|
||||
nmhdr : NMHDR;
|
||||
chrg : CHARRANGE;
|
||||
seltyp : WORD;
|
||||
end;
|
||||
SELCHANGE = _selchange;
|
||||
TSELCHANGE = _selchange;
|
||||
|
||||
_textrange = record
|
||||
chrg : CHARRANGE;
|
||||
lpstrText : LPSTR;
|
||||
end;
|
||||
TEXTRANGEA = _textrange;
|
||||
TTEXTRANGEA = _textrange;
|
||||
|
||||
_textrangew = record
|
||||
chrg : CHARRANGE;
|
||||
lpstrText : LPWSTR;
|
||||
end;
|
||||
TEXTRANGEW = _textrangew;
|
||||
TTEXTRANGEW = _textrangew;
|
||||
|
||||
_reqresize = record
|
||||
nmhdr : NMHDR;
|
||||
rc : RECT;
|
||||
end;
|
||||
REQRESIZE = _reqresize;
|
||||
TREQRESIZE = _reqresize;
|
||||
|
||||
_repastespecial = record
|
||||
dwAspect : DWORD;
|
||||
dwParam : DWORD;
|
||||
end;
|
||||
REPASTESPECIAL = _repastespecial;
|
||||
TREPASTESPECIAL = _repastespecial;
|
||||
|
||||
_punctuation = record
|
||||
iSize : UINT;
|
||||
szPunctuation : LPSTR;
|
||||
end;
|
||||
PUNCTUATION = _punctuation;
|
||||
TPUNCTUATION = _punctuation;
|
||||
|
||||
_gettextex = record
|
||||
cb : DWORD;
|
||||
flags : DWORD;
|
||||
codepage : UINT;
|
||||
lpDefaultChar : LPCSTR;
|
||||
lpUsedDefaultChar : LPBOOL;
|
||||
end;
|
||||
GETTEXTEX = _gettextex;
|
||||
TGETTEXTEX = _gettextex;
|
||||
|
||||
EDITWORDBREAKPROCEX = function (pchText:pchar; cchText:LONG; bCharSet:BYTE; action:LONG):LONG;
|
||||
{ Defines for EM_SETTYPOGRAPHYOPTIONS }
|
||||
|
||||
const
|
||||
TO_ADVANCEDTYPOGRAPHY = 1;
|
||||
TO_SIMPLELINEBREAK = 2;
|
||||
{ Defines for GETTEXTLENGTHEX }
|
||||
GTL_DEFAULT = 0;
|
||||
GTL_USECRLF = 1;
|
||||
GTL_PRECISE = 2;
|
||||
GTL_CLOSE = 4;
|
||||
GTL_NUMCHARS = 8;
|
||||
GTL_NUMBYTES = 16;
|
||||
|
||||
type
|
||||
|
||||
_gettextlengthex = record
|
||||
flags : DWORD;
|
||||
codepage : UINT;
|
||||
end;
|
||||
GETTEXTLENGTHEX = _gettextlengthex;
|
||||
{$ifdef UNICODE}
|
||||
|
||||
CHARFORMAT = CHARFORMATW;
|
||||
TCHARFORMAT = CHARFORMATW;
|
||||
CHARFORMAT2 = CHARFORMAT2W;
|
||||
TCHARFORMAT2 = CHARFORMAT2W;
|
||||
FINDTEXT = FINDTEXTW;
|
||||
TFINDTEXT = FINDTEXTW;
|
||||
FINDTEXTEX = FINDTEXTEXW;
|
||||
TFINDTEXTEX = FINDTEXTEXW;
|
||||
TEXTRANGE = TEXTRANGEW;
|
||||
TTEXTRANGE = TEXTRANGEW;
|
||||
{$else}
|
||||
|
||||
type
|
||||
|
||||
CHARFORMAT = CHARFORMATA;
|
||||
TCHARFORMAT = CHARFORMATA;
|
||||
CHARFORMAT2 = CHARFORMAT2A;
|
||||
TCHARFORMAT2 = CHARFORMAT2A;
|
||||
FINDTEXT = FINDTEXTA;
|
||||
TFINDTEXT = FINDTEXTA;
|
||||
FINDTEXTEX = FINDTEXTEXA;
|
||||
TFINDTEXTEX = FINDTEXTEXA;
|
||||
TEXTRANGE = TEXTRANGEA;
|
||||
TTEXTRANGE = TEXTRANGEA;
|
||||
{$endif}
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
938
packages/winunits-base/src/shellapi.pp
Normal file
938
packages/winunits-base/src/shellapi.pp
Normal file
@ -0,0 +1,938 @@
|
||||
{
|
||||
This file is part of the Free Pascal run time library.
|
||||
This unit contains the record definition for the Win32 API
|
||||
Copyright (c) 1999-2002 by Marco van de Voort,
|
||||
member of the Free Pascal development team.
|
||||
|
||||
See the file COPYING.FPC, included in this distribution,
|
||||
for details about the copyright.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
************************************************************************}
|
||||
|
||||
{ leave out unused functions so the unit can be used on win2000 as well }
|
||||
{$ifndef NO_SMART_LINK}
|
||||
{$smartlink on}
|
||||
{$endif}
|
||||
|
||||
{$PACKRECORDS C}
|
||||
{$calling stdcall}
|
||||
{$mode objfpc}
|
||||
|
||||
Unit ShellApi;
|
||||
|
||||
//+-------------------------------------------------------------------------
|
||||
//
|
||||
// Microsoft Windows
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
// File: shellapi.h
|
||||
//
|
||||
// Header translation by Marco van de Voort for Free Pascal Platform
|
||||
// SDK dl'ed January 2002
|
||||
//
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
|
||||
Interface
|
||||
|
||||
Uses Windows;
|
||||
{
|
||||
shellapi.h - SHELL.DLL functions, types, and definitions
|
||||
Copyright (c) Microsoft Corporation. All rights reserved. }
|
||||
|
||||
Type
|
||||
HDROP = THandle;
|
||||
PHIcon = ^HIcon;
|
||||
|
||||
STARTUPINFOW = record // a guess. Omission should get fixed in Windows.
|
||||
cb : DWORD;
|
||||
lpReserved : LPTSTR;
|
||||
lpDesktop : LPTSTR;
|
||||
lpTitle : LPTSTR;
|
||||
dwX : DWORD;
|
||||
dwY : DWORD;
|
||||
dwXSize : DWORD;
|
||||
dwYSize : DWORD;
|
||||
dwXCountChars : DWORD;
|
||||
dwYCountChars : DWORD;
|
||||
dwFillAttribute : DWORD;
|
||||
dwFlags : DWORD;
|
||||
wShowWindow : WORD;
|
||||
cbReserved2 : WORD;
|
||||
lpReserved2 : LPBYTE;
|
||||
hStdInput : HANDLE;
|
||||
hStdOutput : HANDLE;
|
||||
hStdError : HANDLE;
|
||||
end;
|
||||
LPSTARTUPINFOW = ^STARTUPINFOW;
|
||||
_STARTUPINFOW = STARTUPINFOW;
|
||||
TSTARTUPINFOW = STARTUPINFOW;
|
||||
PSTARTUPINFOW = ^STARTUPINFOW;
|
||||
|
||||
|
||||
{unicode}
|
||||
Function DragQueryFileA(arg1 : HDROP; arg2 : UINT;arg3 : LPSTR ; arg4 : UINT):UINT;external 'shell32.dll' name 'DragQueryFileA';
|
||||
Function DragQueryFileW(arg1 : HDROP; arg2 : UINT;arg3 : LPWSTR; arg4 : UINT):UINT;external 'shell32.dll' name 'DragQueryFileW';
|
||||
Function DragQueryFile(arg1 : HDROP; arg2 : UINT;arg3 : LPSTR ; arg4 : UINT):UINT;external 'shell32.dll' name 'DragQueryFileA';
|
||||
Function DragQueryFile(arg1 : HDROP; arg2 : UINT;arg3 : LPWSTR; arg4 : UINT):UINT;external 'shell32.dll' name 'DragQueryFileW';
|
||||
|
||||
Function DragQueryPoint(arg1 : HDROP; arg2 :LPPOINT):BOOL; external 'shell32.dll' name 'DragQueryPoint';
|
||||
Procedure DragFinish(arg1 : HDROP); external 'shell32.dll' name 'DragFinish';
|
||||
Procedure DragAcceptFiles(hwnd : HWND;arg2: BOOL); external 'shell32.dll' name 'DragAcceptFiles';
|
||||
|
||||
Function ShellExecuteA(HWND: hwnd;lpOperation : LPCSTR ; lpFile : LPCSTR ; lpParameters : LPCSTR; lpDirectory: LPCSTR; nShowCmd:LONGINT):HInst; external 'shell32.dll' name 'ShellExecuteA';
|
||||
Function ShellExecuteW(hwnd: HWND;lpOperation : LPCWSTR ; lpFile : LPCWSTR ; lpParameters : LPCWSTR; lpDirectory: LPCWSTR; nShowCmd:LONGINT):HInst; external 'shell32.dll' name 'ShellExecuteW';
|
||||
Function ShellExecute(HWND: hwnd;lpOperation : LPCSTR ; lpFile : LPCSTR ; lpParameters : LPCSTR; lpDirectory: LPCSTR; nShowCmd:LONGINT):HInst; external 'shell32.dll' name 'ShellExecuteA';
|
||||
Function ShellExecute(hwnd: HWND;lpOperation : LPCWSTR ; lpFile : LPCWSTR ; lpParameters : LPCWSTR; lpDirectory: LPCWSTR; nShowCmd:LONGINT):HInst; external 'shell32.dll' name 'ShellExecuteW';
|
||||
|
||||
Function FindExecutableA(lpFile : LPCSTR ;lpDirectory : LPCSTR ; lpResult : LPSTR):HInst;external 'shell32.dll' name 'FindExecutableA';
|
||||
Function FindExecutableW(lpFile : LPCWSTR;lpDirectory : LPCWSTR; lpResult : LPWSTR):HInst;external 'shell32.dll' name 'FindExecutableW';
|
||||
Function FindExecutable(lpFile : LPCSTR ;lpDirectory : LPCSTR ; lpResult : LPSTR):HInst;external 'shell32.dll' name 'FindExecutableA';
|
||||
Function FindExecutable(lpFile : LPCWSTR;lpDirectory : LPCWSTR; lpResult : LPWSTR):HInst;external 'shell32.dll' name 'FindExecutableW';
|
||||
|
||||
Function CommandLineToArgvW(lpCmdLine : LPCWSTR;pNumArgs : plongint):pLPWSTR;external 'shell32.dll' name 'CommandLineToArgvW';
|
||||
|
||||
Function ShellAboutA(HWND: hWnd; szApp : LPCSTR; szOtherStuff : LPCSTR; HICON : hIcon):Longint; external 'shell32.dll' name 'ShellAboutA';
|
||||
Function ShellAboutW(HWND: hWnd; szApp : LPCWSTR; szOtherStuff : LPCWSTR; HICON : hIcon):Longint; external 'shell32.dll' name 'ShellAboutW';
|
||||
Function ShellAbout(HWND: hWnd; szApp : LPCSTR; szOtherStuff : LPCSTR; HICON : hIcon):Longint; external 'shell32.dll' name 'ShellAboutA';
|
||||
Function ShellAbout(HWND: hWnd; szApp : LPCWSTR; szOtherStuff : LPCWSTR; HICON : hIcon):Longint; external 'shell32.dll' name 'ShellAboutW';
|
||||
|
||||
Function DuplicateIcon(hinst : HINST; HICON: hIcon):HIcon; external 'shell32.dll' name 'DuplicateIcon';
|
||||
|
||||
Function ExtractAssociatedIconA(hInst : HINST; lpIconPath : LPSTR; lpiIcon : LPWORD):HICON;external 'shell32.dll' name 'ExtractAssociatedIconA';
|
||||
Function ExtractAssociatedIconW(hInst : HINST; lpIconPath : LPWSTR; lpiIcon : LPWORD):HICON;external 'shell32.dll' name 'ExtractAssociatedIconW';
|
||||
Function ExtractAssociatedIcon(hInst : HINST; lpIconPath : LPSTR; lpiIcon : LPWORD):HICON;external 'shell32.dll' name 'ExtractAssociatedIconA';
|
||||
Function ExtractAssociatedIcon(hInst : HINST; lpIconPath : LPWSTR; lpiIcon : LPWORD):HICON;external 'shell32.dll' name 'ExtractAssociatedIconW';
|
||||
|
||||
Function ExtractIconA(hInst: HINST; lpszExeFileName :LPCSTR ; nIconIndex : UINT):HICON;external 'shell32.dll' name 'ExtractIconA';
|
||||
Function ExtractIconW(hInst: HINST; lpszExeFileName :LPCWSTR ; nIconIndex : UINT):HICON;external 'shell32.dll' name 'ExtractIconW';
|
||||
|
||||
Function ExtractIcon(hInst: HINST; lpszExeFileName :LPCSTR ; nIconIndex : UINT):HICON;external 'shell32.dll' name 'ExtractIconA';
|
||||
Function ExtractIcon(hInst: HINST; lpszExeFileName :LPCWSTR ; nIconIndex : UINT):HICON;external 'shell32.dll' name 'ExtractIconW';
|
||||
|
||||
// if(WINVER >= 0x0400)
|
||||
|
||||
Type
|
||||
{ init with sizeof(DRAGINFO) }
|
||||
|
||||
_DRAGINFOA = Record
|
||||
uSize : UINT;
|
||||
pt : POINT;
|
||||
fNC : BOOL;
|
||||
lpFileList : LPSTR;
|
||||
grfKeyState : DWORD;
|
||||
end;
|
||||
DRAGINFOA = _DRAGINFOA;
|
||||
TDRAGINFOA = _DRAGINFOA;
|
||||
LPDRAGINFOA = ^_DRAGINFOA;
|
||||
|
||||
{ init with sizeof(DRAGINFO) }
|
||||
|
||||
_DRAGINFOW = Record
|
||||
uSize : UINT;
|
||||
pt : POINT;
|
||||
fNC : BOOL;
|
||||
lpFileList : LPWSTR;
|
||||
grfKeyState : DWORD;
|
||||
end;
|
||||
DRAGINFOW = _DRAGINFOW;
|
||||
TDRAGINFOW = _DRAGINFOW;
|
||||
LPDRAGINFOW = ^_DRAGINFOW;
|
||||
|
||||
{$ifdef UNICODE}
|
||||
DRAGINFO = DRAGINFOW;
|
||||
TDRAGINFO = DRAGINFOW;
|
||||
LPDRAGINFO = LPDRAGINFOW;
|
||||
{$else}
|
||||
DRAGINFO = DRAGINFOA;
|
||||
TDRAGINFO = DRAGINFOW;
|
||||
LPDRAGINFO = LPDRAGINFOA;
|
||||
{$endif}
|
||||
|
||||
Const
|
||||
ABM_NEW = $00000000;
|
||||
ABM_REMOVE = $00000001;
|
||||
ABM_QUERYPOS = $00000002;
|
||||
ABM_SETPOS = $00000003;
|
||||
ABM_GETSTATE = $00000004;
|
||||
ABM_GETTASKBARPOS = $00000005;
|
||||
ABM_ACTIVATE = $00000006; { lParam == TRUE/FALSE means activate/deactivate }
|
||||
ABM_GETAUTOHIDEBAR = $00000007;
|
||||
ABM_SETAUTOHIDEBAR = $00000008; { this can fail at any time. MUST check the result }
|
||||
{ lParam = TRUE/FALSE Set/Unset }
|
||||
{ uEdge = what edge }
|
||||
ABM_WINDOWPOSCHANGED = $0000009;
|
||||
ABM_SETSTATE = $0000000a;
|
||||
ABN_STATECHANGE = $0000000; { these are put in the wparam of callback messages }
|
||||
ABN_POSCHANGED = $0000001;
|
||||
ABN_FULLSCREENAPP = $0000002;
|
||||
ABN_WINDOWARRANGE = $0000003; { lParam == TRUE means hide }
|
||||
|
||||
{ flags for get state }
|
||||
ABS_AUTOHIDE = $0000001;
|
||||
ABS_ALWAYSONTOP = $0000002;
|
||||
ABE_LEFT = 0;
|
||||
ABE_TOP = 1;
|
||||
ABE_RIGHT = 2;
|
||||
ABE_BOTTOM = 3;
|
||||
|
||||
|
||||
Type
|
||||
|
||||
_AppBarData = Record
|
||||
cbSize : DWORD;
|
||||
hWnd : HWND;
|
||||
uCallbackMessage : UINT;
|
||||
uEdge : UINT;
|
||||
rc : RECT;
|
||||
lParam : LPARAM; { message specific }
|
||||
end;
|
||||
APPBARDATA = _AppBarData;
|
||||
TAPPBARDATA = _AppBarData;
|
||||
PAPPBARDATA = ^_AppBarData;
|
||||
|
||||
|
||||
Function SHAppBarMessage(dwMessage : DWORD; pData : APPBARDATA):UINT_PTR;external 'shell32.dll' name 'SHAppBarMessage';
|
||||
|
||||
//
|
||||
// EndAppBar
|
||||
//
|
||||
|
||||
Function DoEnvironmentSubstA(szString: LPSTR; cchString:UINT):DWORD;external 'shell32.dll' name 'DoEnvironmentSubstA';
|
||||
Function DoEnvironmentSubstW(szString: LPWSTR; cchString:UINT):DWORD;external 'shell32.dll' name 'DoEnvironmentSubstW';
|
||||
Function DoEnvironmentSubst(szString: LPSTR; cchString:UINT):DWORD;external 'shell32.dll' name 'DoEnvironmentSubstA';
|
||||
Function DoEnvironmentSubst(szString: LPWSTR; cchString:UINT):DWORD;external 'shell32.dll' name 'DoEnvironmentSubstW';
|
||||
|
||||
{Macro}
|
||||
function EIRESID(x : longint) : longint;
|
||||
|
||||
Function ExtractIconExA(lpszFile : LPCSTR; nIconIndex:Longint; phiconLarge:pHICON; phiconSmall:pHIcon; nIcons:UINT):UINT; external 'shell32.dll' name 'ExtractIconExA';
|
||||
Function ExtractIconExW(lpszFile : LPCWSTR; nIconIndex:Longint; phiconLarge:pHICON; phiconSmall:pHIcon; nIcons:UINT):UINT; external 'shell32.dll' name 'ExtractIconExW';
|
||||
Function ExtractIconExA(lpszFile : LPCSTR; nIconIndex:Longint; var phiconLarge:HICON;var phiconSmall:HIcon; nIcons:UINT):UINT; external 'shell32.dll' name 'ExtractIconExA';
|
||||
Function ExtractIconExW(lpszFile : LPCWSTR; nIconIndex:Longint; var phiconLarge:HICON;var phiconSmall:HIcon; nIcons:UINT):UINT; external 'shell32.dll' name 'ExtractIconExW';
|
||||
|
||||
Function ExtractIconEx (lpszFile : LPCSTR; nIconIndex:Longint; phiconLarge:pHICON; phiconSmall:pHIcon; nIcons:UINT):UINT; external 'shell32.dll' name 'ExtractIconExA';
|
||||
Function ExtractIconEx (lpszFile : LPCWSTR; nIconIndex:Longint; phiconLarge:pHICON; phiconSmall:pHIcon; nIcons:UINT):UINT; external 'shell32.dll' name 'ExtractIconExW';
|
||||
Function ExtractIconEx (lpszFile : LPCSTR; nIconIndex:Longint; var phiconLarge:HICON;var phiconSmall:HIcon; nIcons:UINT):UINT; external 'shell32.dll' name 'ExtractIconExA';
|
||||
Function ExtractIconEx (lpszFile : LPCWSTR; nIconIndex:Longint; var phiconLarge:HICON;var phiconSmall:HIcon; nIcons:UINT):UINT; external 'shell32.dll' name 'ExtractIconExW';
|
||||
|
||||
//
|
||||
// Shell File Operations
|
||||
//
|
||||
|
||||
//ifndef FO_MOVE //these need to be kept in sync with the ones in shlobj.h}
|
||||
Const
|
||||
FO_MOVE = $0001;
|
||||
FO_COPY = $0002;
|
||||
FO_DELETE = $0003;
|
||||
FO_RENAME = $0004;
|
||||
FOF_MULTIDESTFILES = $0001;
|
||||
FOF_CONFIRMMOUSE = $0002;
|
||||
FOF_SILENT = $0004; { don't create progress/report }
|
||||
FOF_RENAMEONCOLLISION = $0008;
|
||||
FOF_NOCONFIRMATION = $0010; { Don't prompt the user. }
|
||||
FOF_WANTMAPPINGHANDLE = $0020; { Fill in SHFILEOPSTRUCT.hNameMappings }
|
||||
FOF_ALLOWUNDO = $0040; { Must be freed using SHFreeNameMappings }
|
||||
FOF_FILESONLY = $0080; { on *.*, do only files }
|
||||
FOF_SIMPLEPROGRESS = $0100; { means don't show names of files }
|
||||
FOF_NOCONFIRMMKDIR = $0200; { don't confirm making any needed dirs }
|
||||
FOF_NOERRORUI = $0400; { don't put up error UI }
|
||||
FOF_NOCOPYSECURITYATTRIBS= $0800; { dont copy NT file Security Attributes }
|
||||
FOF_NORECURSION = $1000; { don't recurse into directories. }
|
||||
|
||||
//if (_WIN32_IE >= 0x0500)
|
||||
FOF_NO_CONNECTED_ELEMENTS= $2000; { don't operate on connected elements. }
|
||||
FOF_WANTNUKEWARNING = $4000; { during delete operation, warn if nuking instead of recycling (partially overrides FOF_NOCONFIRMATION) }
|
||||
//endif
|
||||
|
||||
//if (_WIN32_WINNT >= 0x0501)
|
||||
FOF_NORECURSEREPARSE = $8000; { treat reparse points as objects, not containers }
|
||||
//endif
|
||||
|
||||
Type
|
||||
FILEOP_FLAGS = WORD;
|
||||
|
||||
Const
|
||||
PO_DELETE = $0013; { printer is being deleted }
|
||||
PO_RENAME = $0014; { printer is being renamed }
|
||||
|
||||
PO_PORTCHANGE = $0020; { port this printer connected to is being changed }
|
||||
{ if this id is set, the strings received by }
|
||||
{ the copyhook are a doubly-null terminated }
|
||||
{ list of strings. The first is the printer }
|
||||
{ name and the second is the printer port. }
|
||||
|
||||
PO_REN_PORT = $0034; { PO_RENAME and PO_PORTCHANGE at same time. }
|
||||
|
||||
{ no POF_ flags currently defined }
|
||||
|
||||
Type
|
||||
|
||||
PRINTEROP_FLAGS = WORD;
|
||||
//endif}
|
||||
|
||||
{ FO_MOVE }
|
||||
{ implicit parameters are: }
|
||||
{ if pFrom or pTo are unqualified names the current directories are }
|
||||
{ taken from the global current drive/directory settings managed }
|
||||
{ by Get/SetCurrentDrive/Directory }
|
||||
{ }
|
||||
{ the global confirmation settings }
|
||||
{ only used if FOF_SIMPLEPROGRESS }
|
||||
|
||||
Type
|
||||
|
||||
_SHFILEOPSTRUCTA = Record
|
||||
hwnd : HWND;
|
||||
wFunc : UINT;
|
||||
pFrom : LPCSTR;
|
||||
pTo : LPCSTR;
|
||||
fFlags : FILEOP_FLAGS;
|
||||
fAnyOperationsAborted : BOOL;
|
||||
hNameMappings : LPVOID;
|
||||
lpszProgressTitle : LPCSTR; { only used if FOF_SIMPLEPROGRESS }
|
||||
end;
|
||||
SHFILEOPSTRUCTA = _SHFILEOPSTRUCTA;
|
||||
TSHFILEOPSTRUCTA = _SHFILEOPSTRUCTA;
|
||||
LPSHFILEOPSTRUCTA = ^_SHFILEOPSTRUCTA;
|
||||
|
||||
|
||||
_SHFILEOPSTRUCTW = record
|
||||
hwnd : HWND;
|
||||
wFunc : UINT;
|
||||
pFrom : LPCWSTR;
|
||||
pTo : LPCWSTR;
|
||||
fFlags : FILEOP_FLAGS;
|
||||
fAnyOperationsAborted : BOOL;
|
||||
hNameMappings : LPVOID;
|
||||
lpszProgressTitle : LPCWSTR;
|
||||
end;
|
||||
SHFILEOPSTRUCTW = _SHFILEOPSTRUCTW;
|
||||
TSHFILEOPSTRUCTW = _SHFILEOPSTRUCTW;
|
||||
LPSHFILEOPSTRUCTW = ^_SHFILEOPSTRUCTW;
|
||||
{$ifdef UNICODE}
|
||||
SHFILEOPSTRUCT = SHFILEOPSTRUCTW;
|
||||
TSHFILEOPSTRUCT = SHFILEOPSTRUCTW;
|
||||
LPSHFILEOPSTRUCT = LPSHFILEOPSTRUCTW;
|
||||
{$else}
|
||||
SHFILEOPSTRUCT = SHFILEOPSTRUCTA;
|
||||
TSHFILEOPSTRUCT = SHFILEOPSTRUCTA;
|
||||
LPSHFILEOPSTRUCT = LPSHFILEOPSTRUCTA;
|
||||
{$endif}
|
||||
|
||||
Function SHFileOperationA(lpFileOp:LPSHFILEOPSTRUCTA ):Longint;external 'shell32.dll' name 'SHFileOperationA';
|
||||
Function SHFileOperationW(lpFileOp:LPSHFILEOPSTRUCTW ):Longint;external 'shell32.dll' name 'SHFileOperationW';
|
||||
|
||||
Function SHFileOperation(lpFileOp:LPSHFILEOPSTRUCTA ):Longint;external 'shell32.dll' name 'SHFileOperationA';
|
||||
Function SHFileOperation(lpFileOp:LPSHFILEOPSTRUCTW ):Longint;external 'shell32.dll' name 'SHFileOperationW';
|
||||
|
||||
Procedure SHFreeNameMappings(hNameMappings : THandle);external 'shell32.dll' name 'SHFreeNameMappings';
|
||||
|
||||
Type
|
||||
|
||||
_SHNAMEMAPPINGA = Record
|
||||
pszOldPath : LPSTR;
|
||||
pszNewPath : LPSTR;
|
||||
cchOldPath : longint;
|
||||
cchNewPath : longint;
|
||||
end;
|
||||
SHNAMEMAPPINGA = _SHNAMEMAPPINGA;
|
||||
TSHNAMEMAPPINGA = _SHNAMEMAPPINGA;
|
||||
LPSHNAMEMAPPINGA = ^_SHNAMEMAPPINGA;
|
||||
|
||||
_SHNAMEMAPPINGW = Record
|
||||
pszOldPath : LPWSTR;
|
||||
pszNewPath : LPWSTR;
|
||||
cchOldPath : longint;
|
||||
cchNewPath : longint;
|
||||
end;
|
||||
SHNAMEMAPPINGW = _SHNAMEMAPPINGW;
|
||||
TSHNAMEMAPPINGW = _SHNAMEMAPPINGW;
|
||||
LPSHNAMEMAPPINGW = ^_SHNAMEMAPPINGW;
|
||||
{$ifndef UNICODE}
|
||||
SHNAMEMAPPING = SHNAMEMAPPINGW;
|
||||
TSHNAMEMAPPING = SHNAMEMAPPINGW;
|
||||
LPSHNAMEMAPPING = LPSHNAMEMAPPINGW;
|
||||
{$else}
|
||||
SHNAMEMAPPING = SHNAMEMAPPINGA;
|
||||
TSHNAMEMAPPING = SHNAMEMAPPINGA;
|
||||
LPSHNAMEMAPPING = LPSHNAMEMAPPINGA;
|
||||
{$endif}
|
||||
|
||||
//
|
||||
// End Shell File Operations
|
||||
//
|
||||
//
|
||||
// Begin ShellExecuteEx and family
|
||||
//
|
||||
|
||||
|
||||
{ ShellExecute() and ShellExecuteEx() error codes }
|
||||
{ regular WinExec() codes }
|
||||
|
||||
|
||||
const
|
||||
SE_ERR_FNF = 2; { file not found }
|
||||
SE_ERR_PNF = 3; { path not found }
|
||||
SE_ERR_ACCESSDENIED = 5; { access denied }
|
||||
SE_ERR_OOM = 8; { out of memory }
|
||||
SE_ERR_DLLNOTFOUND = 32;
|
||||
// endif WINVER >= 0x0400
|
||||
|
||||
{ error values for ShellExecute() beyond the regular WinExec() codes }
|
||||
SE_ERR_SHARE = 26;
|
||||
SE_ERR_ASSOCINCOMPLETE = 27;
|
||||
SE_ERR_DDETIMEOUT = 28;
|
||||
SE_ERR_DDEFAIL = 29;
|
||||
SE_ERR_DDEBUSY = 30;
|
||||
SE_ERR_NOASSOC = 31;
|
||||
|
||||
//if(WINVER >= 0x0400)}
|
||||
|
||||
{ Note CLASSKEY overrides CLASSNAME }
|
||||
|
||||
SEE_MASK_CLASSNAME = $00000001;
|
||||
SEE_MASK_CLASSKEY = $00000003;
|
||||
{ Note INVOKEIDLIST overrides IDLIST }
|
||||
SEE_MASK_IDLIST = $00000004;
|
||||
SEE_MASK_INVOKEIDLIST = $0000000c;
|
||||
SEE_MASK_ICON = $00000010;
|
||||
SEE_MASK_HOTKEY = $00000020;
|
||||
SEE_MASK_NOCLOSEPROCESS = $00000040;
|
||||
SEE_MASK_CONNECTNETDRV = $00000080;
|
||||
SEE_MASK_FLAG_DDEWAIT = $00000100;
|
||||
SEE_MASK_DOENVSUBST = $00000200;
|
||||
SEE_MASK_FLAG_NO_UI = $00000400;
|
||||
SEE_MASK_UNICODE = $00004000;
|
||||
SEE_MASK_NO_CONSOLE = $00008000;
|
||||
SEE_MASK_ASYNCOK = $00100000;
|
||||
SEE_MASK_HMONITOR = $00200000;
|
||||
//if (_WIN32_IE >= 0x0500)
|
||||
SEE_MASK_NOQUERYCLASSSTORE= $01000000;
|
||||
SEE_MASK_WAITFORINPUTIDLE= $02000000;
|
||||
//endif (_WIN32_IE >= 0x500)
|
||||
//if (_WIN32_IE >= 0x0560)
|
||||
SEE_MASK_FLAG_LOG_USAGE = $04000000;
|
||||
//endif
|
||||
{ (_WIN32_IE >= 0x560) }
|
||||
|
||||
type
|
||||
|
||||
_SHELLEXECUTEINFOA = record
|
||||
cbSize : DWORD;
|
||||
fMask : ULONG;
|
||||
hwnd : HWND;
|
||||
lpVerb : LPCSTR;
|
||||
lpFile : LPCSTR;
|
||||
lpParameters : LPCSTR;
|
||||
lpDirectory : LPCSTR;
|
||||
nShow : longint;
|
||||
hInstApp : HINST;
|
||||
lpIDList : LPVOID;
|
||||
lpClass : LPCSTR;
|
||||
hkeyClass : HKEY;
|
||||
dwHotKey : DWORD;
|
||||
DUMMYUNIONNAME : record
|
||||
case longint of
|
||||
0 : ( hIcon : HANDLE );
|
||||
1 : ( hMonitor : HANDLE );
|
||||
end;
|
||||
hProcess : HANDLE;
|
||||
end;
|
||||
|
||||
SHELLEXECUTEINFOA = _SHELLEXECUTEINFOA;
|
||||
TSHELLEXECUTEINFOA = _SHELLEXECUTEINFOA;
|
||||
LPSHELLEXECUTEINFOA = ^_SHELLEXECUTEINFOA;
|
||||
|
||||
|
||||
_SHELLEXECUTEINFOW = record
|
||||
cbSize : DWORD;
|
||||
fMask : ULONG;
|
||||
hwnd : HWND;
|
||||
lpVerb : lpcwstr;
|
||||
lpFile : lpcwstr;
|
||||
lpParameters : lpcwstr;
|
||||
lpDirectory : lpcwstr;
|
||||
nShow : longint;
|
||||
hInstApp : HINST;
|
||||
lpIDList : LPVOID;
|
||||
lpClass : LPCWSTR;
|
||||
hkeyClass : HKEY;
|
||||
dwHotKey : DWORD;
|
||||
DUMMYUNIONNAME : record
|
||||
case longint of
|
||||
0 : ( hIcon : HANDLE );
|
||||
1 : ( hMonitor : HANDLE );
|
||||
end;
|
||||
hProcess : HANDLE;
|
||||
end;
|
||||
|
||||
SHELLEXECUTEINFOW = _SHELLEXECUTEINFOW;
|
||||
TSHELLEXECUTEINFOW = _SHELLEXECUTEINFOW;
|
||||
LPSHELLEXECUTEINFOW = ^_SHELLEXECUTEINFOW;
|
||||
|
||||
{$ifdef UNICODE}
|
||||
SHELLEXECUTEINFO = SHELLEXECUTEINFOW;
|
||||
TSHELLEXECUTEINFO = SHELLEXECUTEINFOW;
|
||||
LPSHELLEXECUTEINFO = LPSHELLEXECUTEINFOW;
|
||||
{$else}
|
||||
SHELLEXECUTEINFO = SHELLEXECUTEINFOA;
|
||||
TSHELLEXECUTEINFO = SHELLEXECUTEINFOA;
|
||||
LPSHELLEXECUTEINFO = LPSHELLEXECUTEINFOA;
|
||||
{$endif}
|
||||
|
||||
Function ShellExecuteExA(lpExecInfo: LPSHELLEXECUTEINFOA):Bool;external 'shell32.dll' name 'ShellExecuteExA';
|
||||
Function ShellExecuteExW(lpExecInfo: LPSHELLEXECUTEINFOW):Bool;external 'shell32.dll' name 'ShellExecuteExW';
|
||||
Function ShellExecuteEx(lpExecInfo: LPSHELLEXECUTEINFOA):Bool;external 'shell32.dll' name 'ShellExecuteExA';
|
||||
Function ShellExecuteEx(lpExecInfo: LPSHELLEXECUTEINFOW):Bool;external 'shell32.dll' name 'ShellExecuteExW';
|
||||
|
||||
Procedure WinExecErrorA(HWND : hwnd; error : Longint;lpstrFileName:LPCSTR; lpstrTitle:LPCSTR); external 'shell32.dll' name 'WinExecErrorA';
|
||||
Procedure WinExecErrorW(HWND : hwnd; error : Longint;lpstrFileName:LPCWSTR; lpstrTitle:LPCWSTR); external 'shell32.dll' name 'WinExecErrorW';
|
||||
Procedure WinExecError(HWND : hwnd; error : Longint;lpstrFileName:LPCSTR; lpstrTitle:LPCSTR); external 'shell32.dll' name 'WinExecErrorA';
|
||||
Procedure WinExecError(HWND : hwnd; error : Longint;lpstrFileName:LPCWSTR; lpstrTitle:LPCWSTR); external 'shell32.dll' name 'WinExecErrorW';
|
||||
|
||||
type
|
||||
|
||||
_SHCREATEPROCESSINFOW = record
|
||||
cbSize : DWORD;
|
||||
fMask : ULONG;
|
||||
hwnd : HWND;
|
||||
pszFile : LPCWSTR;
|
||||
pszParameters : LPCWSTR;
|
||||
pszCurrentDirectory : LPCWSTR;
|
||||
{in} hUserToken : HANDLE;
|
||||
{in} lpProcessAttributes : LPSECURITY_ATTRIBUTES;
|
||||
{in} lpThreadAttributes : LPSECURITY_ATTRIBUTES;
|
||||
{in} bInheritHandles : BOOL;
|
||||
{in} dwCreationFlags : DWORD;
|
||||
{in} lpStartupInfo : LPSTARTUPINFOW;
|
||||
{out} lpProcessInformation : LPPROCESS_INFORMATION;
|
||||
end;
|
||||
SHCREATEPROCESSINFOW = _SHCREATEPROCESSINFOW;
|
||||
TSHCREATEPROCESSINFOW = _SHCREATEPROCESSINFOW;
|
||||
PSHCREATEPROCESSINFOW = ^_SHCREATEPROCESSINFOW;
|
||||
|
||||
Function SHCreateProcessAsUserW(pscpi : PSHCREATEPROCESSINFOW):Bool;external 'shell32.dll' name 'SHCreateProcessAsUserW';
|
||||
|
||||
//
|
||||
// End ShellExecuteEx and family }
|
||||
//
|
||||
|
||||
//
|
||||
// RecycleBin
|
||||
//
|
||||
|
||||
{ struct for query recycle bin info }
|
||||
|
||||
Type
|
||||
_SHQUERYRBINFO = record
|
||||
cbSize : DWORD;
|
||||
i64Size : int64;
|
||||
i64NumItems : int64;
|
||||
end;
|
||||
SHQUERYRBINFO = _SHQUERYRBINFO;
|
||||
TSHQUERYRBINFO = _SHQUERYRBINFO;
|
||||
LPSHQUERYRBINFO = ^_SHQUERYRBINFO;
|
||||
|
||||
{ flags for SHEmptyRecycleBin }
|
||||
|
||||
const
|
||||
SHERB_NOCONFIRMATION = $00000001;
|
||||
SHERB_NOPROGRESSUI = $00000002;
|
||||
SHERB_NOSOUND = $00000004;
|
||||
|
||||
function SHQueryRecycleBinA(pszRootPath:LPCSTR; pSHQueryRBInfo:LPSHQUERYRBINFO):HRESULT;external 'shell32.dll' name 'SHQueryRecycleBinA';
|
||||
function SHQueryRecycleBinW(pszRootPath:LPCWSTR; pSHQueryRBInfo:LPSHQUERYRBINFO):HRESULT;external 'shell32.dll' name 'SHQueryRecycleBinW';
|
||||
function SHQueryRecycleBin(pszRootPath:LPCSTR; pSHQueryRBInfo:LPSHQUERYRBINFO):HRESULT;external 'shell32.dll' name 'SHQueryRecycleBinA';
|
||||
function SHQueryRecycleBin(pszRootPath:LPCWSTR; pSHQueryRBInfo:LPSHQUERYRBINFO):HRESULT;external 'shell32.dll' name 'SHQueryRecycleBinW';
|
||||
|
||||
function SHEmptyRecycleBinA(hwnd:HWND; pszRootPath:LPCSTR; dwFlags:DWORD):HRESULT;external 'shell32.dll' name 'SHEmptyRecycleBinA';
|
||||
function SHEmptyRecycleBinW(hwnd:HWND; pszRootPath:LPCWSTR; dwFlags:DWORD):HRESULT;external 'shell32.dll' name 'SHEmptyRecycleBinW';
|
||||
function SHEmptyRecycleBin(hwnd:HWND; pszRootPath:LPCSTR; dwFlags:DWORD):HRESULT;external 'shell32.dll' name 'SHEmptyRecycleBinA';
|
||||
function SHEmptyRecycleBin(hwnd:HWND; pszRootPath:LPCWSTR; dwFlags:DWORD):HRESULT;external 'shell32.dll' name 'SHEmptyRecycleBinW';
|
||||
|
||||
//
|
||||
// end of RecycleBin
|
||||
//
|
||||
|
||||
//
|
||||
// Tray notification definitions
|
||||
//
|
||||
|
||||
Type
|
||||
|
||||
_NOTIFYICONDATAA = record
|
||||
cbSize : DWORD;
|
||||
hWnd : HWND;
|
||||
uID : UINT;
|
||||
uFlags : UINT;
|
||||
uCallbackMessage : UINT;
|
||||
hIcon : HICON;
|
||||
{$ifdef IELower5}
|
||||
szTip : array[0..63] of CHAR;
|
||||
{$else}
|
||||
szTip : array[0..127] of CHAR;
|
||||
{$endif}
|
||||
{$ifdef IEhigherEqual5}
|
||||
dwState : DWORD;
|
||||
dwStateMask : DWORD;
|
||||
szInfo : array[0..255] of CHAR;
|
||||
DUMMYUNIONNAME : record
|
||||
case longint of
|
||||
0 : ( uTimeout : UINT );
|
||||
1 : ( uVersion : UINT );
|
||||
end;
|
||||
szInfoTitle : array[0..63] of CHAR;
|
||||
dwInfoFlags : DWORD;
|
||||
{$endif}
|
||||
{$ifdef IEHighEq6}
|
||||
guidItem : GUID;
|
||||
{$endif}
|
||||
end;
|
||||
NOTIFYICONDATAA = _NOTIFYICONDATAA;
|
||||
TNOTIFYICONDATAA = _NOTIFYICONDATAA;
|
||||
PNOTIFYICONDATAA = ^_NOTIFYICONDATAA;
|
||||
|
||||
|
||||
_NOTIFYICONDATAW = record
|
||||
cbSize : DWORD;
|
||||
hWnd : HWND;
|
||||
uID : UINT;
|
||||
uFlags : UINT;
|
||||
uCallbackMessage : UINT;
|
||||
hIcon : HICON;
|
||||
{$ifdef IELower5}
|
||||
szTip : array[0..63] of WCHAR;
|
||||
{$else}
|
||||
szTip : array[0..127] of WCHAR;
|
||||
{$endif}
|
||||
{$ifdef IEhigherEqual5}
|
||||
dwState : DWORD;
|
||||
dwStateMask : DWORD;
|
||||
szInfo : array[0..255] of WCHAR;
|
||||
DUMMYUNIONNAME : record
|
||||
case longint of
|
||||
0 : ( uTimeout : UINT );
|
||||
1 : ( uVersion : UINT );
|
||||
end;
|
||||
szInfoTitle : array[0..63] of CHAR;
|
||||
dwInfoFlags : DWORD;
|
||||
{$endif}
|
||||
{$ifdef IEHighEq6}
|
||||
guidItem : GUID;
|
||||
{$endif}
|
||||
end;
|
||||
NOTIFYICONDATAW = _NOTIFYICONDATAW;
|
||||
TNOTIFYICONDATAW = _NOTIFYICONDATAW;
|
||||
PNOTIFYICONDATAW = ^_NOTIFYICONDATAW;
|
||||
{$ifdef UNICODE}
|
||||
NOTIFYICONDATA = NOTIFYICONDATAW;
|
||||
TNOTIFYICONDATA = NOTIFYICONDATAW;
|
||||
PNOTIFYICONDATA = PNOTIFYICONDATAW;
|
||||
{$else}
|
||||
NOTIFYICONDATA = NOTIFYICONDATAA;
|
||||
TNOTIFYICONDATA = NOTIFYICONDATAA;
|
||||
PNOTIFYICONDATA = PNOTIFYICONDATAA;
|
||||
{$endif}
|
||||
{ UNICODE }
|
||||
|
||||
{
|
||||
|
||||
#define NOTIFYICONDATAA_V1_SIZE FIELD_OFFSET(NOTIFYICONDATAA, szTip[64])
|
||||
#define NOTIFYICONDATAW_V1_SIZE FIELD_OFFSET(NOTIFYICONDATAW, szTip[64])
|
||||
#ifdef UNICODE
|
||||
#define NOTIFYICONDATA_V1_SIZE NOTIFYICONDATAW_V1_SIZE
|
||||
#else
|
||||
#define NOTIFYICONDATA_V1_SIZE NOTIFYICONDATAA_V1_SIZE
|
||||
#endif
|
||||
|
||||
#define NOTIFYICONDATAA_V2_SIZE FIELD_OFFSET(NOTIFYICONDATAA, guidItem)
|
||||
#define NOTIFYICONDATAW_V2_SIZE FIELD_OFFSET(NOTIFYICONDATAW, guidItem)
|
||||
#ifdef UNICODE
|
||||
#define NOTIFYICONDATA_V2_SIZE NOTIFYICONDATAW_V2_SIZE
|
||||
#else
|
||||
#define NOTIFYICONDATA_V2_SIZE NOTIFYICONDATAA_V2_SIZE
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
const
|
||||
NIN_SELECT = WM_USER + 0;
|
||||
NINF_KEY = $1;
|
||||
NIN_KEYSELECT = NIN_SELECT or NINF_KEY;
|
||||
// if (_WIN32_IE >= 0x0501)}
|
||||
|
||||
NIN_BALLOONSHOW = WM_USER + 2;
|
||||
NIN_BALLOONHIDE = WM_USER + 3;
|
||||
NIN_BALLOONTIMEOUT = WM_USER + 4;
|
||||
NIN_BALLOONUSERCLICK = WM_USER + 5;
|
||||
NIM_ADD = $00000000;
|
||||
NIM_MODIFY = $00000001;
|
||||
NIM_DELETE = $00000002;
|
||||
//if (_WIN32_IE >= 0x0500)}
|
||||
|
||||
NIM_SETFOCUS = $00000003;
|
||||
NIM_SETVERSION = $00000004;
|
||||
NOTIFYICON_VERSION = 3;
|
||||
|
||||
NIF_MESSAGE = $00000001;
|
||||
NIF_ICON = $00000002;
|
||||
NIF_TIP = $00000004;
|
||||
// if (_WIN32_IE >= 0x0500)}
|
||||
NIF_STATE = $00000008;
|
||||
NIF_INFO = $00000010;
|
||||
//if (_WIN32_IE >= 0x600)}
|
||||
|
||||
NIF_GUID = $00000020;
|
||||
//if (_WIN32_IE >= 0x0500)}
|
||||
|
||||
NIS_HIDDEN = $00000001;
|
||||
NIS_SHAREDICON = $00000002;
|
||||
{ says this is the source of a shared icon }
|
||||
{ Notify Icon Infotip flags }
|
||||
NIIF_NONE = $00000000;
|
||||
{ icon flags are mutually exclusive }
|
||||
{ and take only the lowest 2 bits }
|
||||
NIIF_INFO = $00000001;
|
||||
NIIF_WARNING = $00000002;
|
||||
NIIF_ERROR = $00000003;
|
||||
NIIF_ICON_MASK = $0000000F;
|
||||
//if (_WIN32_IE >= 0x0501)}
|
||||
|
||||
NIIF_NOSOUND = $00000010;
|
||||
|
||||
Function Shell_NotifyIconA( dwMessage: Dword;lpData: PNOTIFYICONDATAA):Bool;external 'shell32.dll' name 'Shell_NotifyIconA';
|
||||
Function Shell_NotifyIconW( dwMessage: Dword;lpData: PNOTIFYICONDATAW):Bool;external 'shell32.dll' name 'Shell_NotifyIconW';
|
||||
|
||||
Function Shell_NotifyIcon( dwMessage: Dword;lpData: PNOTIFYICONDATAA):Bool;external 'shell32.dll' name 'Shell_NotifyIconA';
|
||||
Function Shell_NotifyIcon( dwMessage: Dword;lpData: PNOTIFYICONDATAW):Bool;external 'shell32.dll' name 'Shell_NotifyIconW';
|
||||
//
|
||||
// End Tray Notification Icons
|
||||
//
|
||||
|
||||
//
|
||||
// Begin SHGetFileInfo
|
||||
//
|
||||
{
|
||||
The SHGetFileInfo API provides an easy way to get attributes
|
||||
for a file given a pathname.
|
||||
|
||||
PARAMETERS
|
||||
|
||||
pszPath file name to get info about
|
||||
dwFileAttributes file attribs, only used with SHGFI_USEFILEATTRIBUTES
|
||||
psfi place to return file info
|
||||
cbFileInfo size of structure
|
||||
uFlags flags
|
||||
|
||||
RETURN
|
||||
TRUE if things worked
|
||||
}
|
||||
{ out: icon }
|
||||
{ out: icon index }
|
||||
{ out: SFGAO_ flags }
|
||||
{ out: display name (or path) }
|
||||
{ out: type name }
|
||||
|
||||
type
|
||||
|
||||
_SHFILEINFOA = record
|
||||
hIcon : HICON; { out: icon }
|
||||
iIcon : longint; { out: icon index }
|
||||
dwAttributes : DWORD; { out: SFGAO_ flags }
|
||||
szDisplayName : array[0..(MAX_PATH)-1] of CHAR; { out: display name (or path) }
|
||||
szTypeName : array[0..79] of CHAR; { out: type name }
|
||||
end;
|
||||
SHFILEINFOA = _SHFILEINFOA;
|
||||
TSHFILEINFOA = _SHFILEINFOA;
|
||||
pSHFILEINFOA = ^_SHFILEINFOA;
|
||||
|
||||
_SHFILEINFOW = record
|
||||
hIcon : HICON; { out: icon }
|
||||
iIcon : longint; { out: icon index }
|
||||
dwAttributes : DWORD; { out: SFGAO_ flags }
|
||||
szDisplayName : array[0..(MAX_PATH)-1] of WCHAR;{ out: display name (or path) }
|
||||
szTypeName : array[0..79] of WCHAR; { out: type name }
|
||||
end;
|
||||
SHFILEINFOW = _SHFILEINFOW;
|
||||
TSHFILEINFOW = _SHFILEINFOW;
|
||||
pSHFILEINFOW = ^_SHFILEINFOW;
|
||||
|
||||
{$ifdef UNICODE}
|
||||
SHFILEINFO = SHFILEINFOW;
|
||||
TSHFILEINFO = SHFILEINFOW;
|
||||
pFILEINFO = SHFILEINFOW;
|
||||
{$else}
|
||||
SHFILEINFO = SHFILEINFOA;
|
||||
TSHFILEINFO = SHFILEINFOA;
|
||||
pFILEINFO = SHFILEINFOA;
|
||||
{$endif}
|
||||
{ NOTE: This is also in shlwapi.h. Please keep in synch. }
|
||||
|
||||
const
|
||||
SHGFI_ICON = $000000100; { get Icon}
|
||||
SHGFI_DISPLAYNAME = $000000200; { get display name }
|
||||
SHGFI_TYPENAME = $000000400; { get type name }
|
||||
SHGFI_ATTRIBUTES = $000000800; { get attributes }
|
||||
SHGFI_ICONLOCATION = $000001000; { get icon location}
|
||||
SHGFI_EXETYPE = $000002000; { return exe type }
|
||||
SHGFI_SYSICONINDEX = $000004000; { get system icon index }
|
||||
SHGFI_LINKOVERLAY = $000008000; { put a link overlay on icon }
|
||||
SHGFI_SELECTED = $000010000; { show icon in selected state }
|
||||
SHGFI_ATTR_SPECIFIED = $000020000; { get only specified attributes }
|
||||
SHGFI_LARGEICON = $000000000; { get large icon }
|
||||
SHGFI_SMALLICON = $000000001; { get small icon }
|
||||
SHGFI_OPENICON = $000000002; { get open icon }
|
||||
SHGFI_SHELLICONSIZE = $000000004; { get shell size icon }
|
||||
SHGFI_PIDL = $000000008; { pszPath is a pidl }
|
||||
SHGFI_USEFILEATTRIBUTES = $000000010; { use passed dwFileAttribute }
|
||||
//if (_WIN32_IE >= 0x0500)}
|
||||
SHGFI_ADDOVERLAYS = $000000020; { apply the appropriate overlays }
|
||||
SHGFI_OVERLAYINDEX = $000000040; { Get the index of the overlay }
|
||||
{ in the upper 8 bits of the iIcon }
|
||||
Function SHGetFileInfoA(pszPath: LPCSTR; dwFileAttributes : DWORD; psfi: pSHFILEINFOA; cbFileInfo,UFlags: UINT):DWORD;external 'shell32.dll' name 'SHGetFileInfoA';
|
||||
Function SHGetFileInfoW(pszPath: LPCWSTR; dwFileAttributes : DWORD; psfi: pSHFILEINFOW; cbFileInfo,UFlags: UINT):DWORD;external 'shell32.dll' name 'SHGetFileInfoW';
|
||||
Function SHGetFileInfo(pszPath: LPCSTR; dwFileAttributes : DWORD; psfi: pSHFILEINFOA; cbFileInfo,UFlags: UINT):DWORD;external 'shell32.dll' name 'SHGetFileInfoA';
|
||||
|
||||
Function SHGetFileInfoA(pszPath: LPCSTR; dwFileAttributes : DWORD; var psfi: TSHFILEINFOA; cbFileInfo,UFlags: UINT):DWORD;external 'shell32.dll' name 'SHGetFileInfoA';
|
||||
Function SHGetFileInfoW(pszPath: LPCWSTR; dwFileAttributes : DWORD; var psfi: TSHFILEINFOW; cbFileInfo,UFlags: UINT):DWORD;external 'shell32.dll' name 'SHGetFileInfoW';
|
||||
Function SHGetFileInfo(pszPath: LPCSTR; dwFileAttributes : DWORD; var psfi: TSHFILEINFOA; cbFileInfo,UFlags: UINT):DWORD;external 'shell32.dll' name 'SHGetFileInfoA';
|
||||
Function SHGetFileInfo(pszPath: LPCWSTR; dwFileAttributes : DWORD; var psfi: TSHFILEINFOW; cbFileInfo,UFlags: UINT):DWORD;external 'shell32.dll' name 'SHGetFileInfoW';
|
||||
|
||||
Function SHGetDiskFreeSpaceExA( pszDirectoryName : LPCSTR; pulFreeBytesAvailableToCaller : pULARGE_INTEGER; pulTotalNumberOfBytes : pULARGE_INTEGER;pulTotalNumberOfFreeBytes: pULARGE_INTEGER):Bool;external 'shell32.dll' name 'SHGetDiskFreeSpaceExA';
|
||||
Function SHGetDiskFreeSpaceExW( pszDirectoryName : LPCWSTR; pulFreeBytesAvailableToCaller : pULARGE_INTEGER; pulTotalNumberOfBytes : pULARGE_INTEGER;pulTotalNumberOfFreeBytes: pULARGE_INTEGER):Bool;external 'shell32.dll' name 'SHGetDiskFreeSpaceExW';
|
||||
Function SHGetDiskFreeSpaceEx( pszDirectoryName : LPCSTR; pulFreeBytesAvailableToCaller : pULARGE_INTEGER; pulTotalNumberOfBytes : pULARGE_INTEGER;pulTotalNumberOfFreeBytes: pULARGE_INTEGER):Bool;external 'shell32.dll' name 'SHGetDiskFreeSpaceExA';
|
||||
Function SHGetDiskFreeSpace( pszDirectoryName : LPCSTR; pulFreeBytesAvailableToCaller : pULARGE_INTEGER; pulTotalNumberOfBytes : pULARGE_INTEGER;pulTotalNumberOfFreeBytes: pULARGE_INTEGER):Bool;external 'shell32.dll' name 'SHGetDiskFreeSpaceExA';
|
||||
Function SHGetDiskFreeSpaceEx( pszDirectoryName : LPCWSTR; pulFreeBytesAvailableToCaller : pULARGE_INTEGER; pulTotalNumberOfBytes : pULARGE_INTEGER;pulTotalNumberOfFreeBytes: pULARGE_INTEGER):Bool;external 'shell32.dll' name 'SHGetDiskFreeSpaceExW';
|
||||
Function SHGetDiskFreeSpace( pszDirectoryName : LPCWSTR; pulFreeBytesAvailableToCaller : pULARGE_INTEGER; pulTotalNumberOfBytes : pULARGE_INTEGER;pulTotalNumberOfFreeBytes: pULARGE_INTEGER):Bool;external 'shell32.dll' name 'SHGetDiskFreeSpaceExW';
|
||||
|
||||
Function SHGetNewLinkInfoA(pszLinkTo:LPCSTR;pszDir:LPCSTR; pszName:LPSTR; pfMustCopy: pBool; uFlags:UINT):Bool;external 'shell32.dll' name 'SHGetNewLinkInfoA';
|
||||
Function SHGetNewLinkInfoW(pszLinkTo:LPCWSTR;pszDir:LPCWSTR; pszName:LPWSTR; pfMustCopy: pBool; uFlags:UINT):Bool;external 'shell32.dll' name 'SHGetNewLinkInfoW';
|
||||
|
||||
Function SHGetNewLinkInfo (pszLinkTo:LPCSTR;pszDir:LPCSTR; pszName:LPSTR; pfMustCopy: pBool; uFlags:UINT):Bool;external 'shell32.dll' name 'SHGetNewLinkInfoA';
|
||||
Function SHGetNewLinkInfo (pszLinkTo:LPCWSTR;pszDir:LPCWSTR; pszName:LPWSTR; pfMustCopy: pBool; uFlags:UINT):Bool;external 'shell32.dll' name 'SHGetNewLinkInfoW';
|
||||
|
||||
const
|
||||
SHGNLI_PIDL = $000000001; { pszLinkTo is a pidl }
|
||||
SHGNLI_PREFIXNAME = $000000002; { Make name "Shortcut to xxx" }
|
||||
SHGNLI_NOUNIQUE = $000000004; { don't do the unique name generation }
|
||||
// {if (_WIN32_IE >= 0x0501)}
|
||||
SHGNLI_NOLNK = $000000008; { don't add ".lnk" extension }
|
||||
// {$endif}
|
||||
{ _WIN2_IE >= 0x0501 }
|
||||
//
|
||||
// End SHGetFileInfo
|
||||
//
|
||||
|
||||
{ Printer stuff }
|
||||
PRINTACTION_OPEN = 0;
|
||||
PRINTACTION_PROPERTIES = 1;
|
||||
PRINTACTION_NETINSTALL = 2;
|
||||
PRINTACTION_NETINSTALLLINK = 3;
|
||||
PRINTACTION_TESTPAGE = 4;
|
||||
PRINTACTION_OPENNETPRN = 5;
|
||||
{$ifdef WINNT}
|
||||
PRINTACTION_DOCUMENTDEFAULTS = 6;
|
||||
PRINTACTION_SERVERPROPERTIES = 7;
|
||||
{$endif}
|
||||
|
||||
Function SHInvokePrinterCommandA(HWND: hwnd; uAction:UINT; lpBuf1: LPCSTR; lpBuf2: LPCSTR; fModal:Bool):Bool;external 'shell32.dll' name 'SHInvokePrinterCommandA';
|
||||
Function SHInvokePrinterCommandW(HWND: hwnd; uAction:UINT; lpBuf1: LPCWSTR; lpBuf2: LPCWSTR; fModal:Bool):Bool;external 'shell32.dll' name 'SHInvokePrinterCommandW';
|
||||
Function SHInvokePrinterCommand(HWND: hwnd; uAction:UINT; lpBuf1: LPCSTR; lpBuf2: LPCSTR; fModal:Bool):Bool;external 'shell32.dll' name 'SHInvokePrinterCommandA';
|
||||
Function SHInvokePrinterCommand(HWND: hwnd; uAction:UINT; lpBuf1: LPCWSTR; lpBuf2: LPCWSTR; fModal:Bool):Bool;external 'shell32.dll' name 'SHInvokePrinterCommandW';
|
||||
|
||||
// WINVER >= 0x0400
|
||||
//if (_WIN32_WINNT >= 0x0500) || (_WIN32_WINDOWS >= 0x0500)
|
||||
//
|
||||
// The SHLoadNonloadedIconOverlayIdentifiers API causes the shell's
|
||||
// icon overlay manager to load any registered icon overlay
|
||||
// identifers that are not currently loaded. This is useful if an
|
||||
// overlay identifier did not load at shell startup but is needed
|
||||
// and can be loaded at a later time. Identifiers already loaded
|
||||
// are not affected. Overlay identifiers implement the
|
||||
// IShellIconOverlayIdentifier interface.
|
||||
//
|
||||
// Returns:
|
||||
// S_OK
|
||||
//
|
||||
|
||||
function SHLoadNonloadedIconOverlayIdentifiers:HResult; external 'shell32.dll' name 'SHInvokePrinterCommandW';
|
||||
|
||||
//
|
||||
// The SHIsFileAvailableOffline API determines whether a file
|
||||
// or folder is available for offline use.
|
||||
//
|
||||
// Parameters:
|
||||
// pwszPath file name to get info about
|
||||
// pdwStatus (optional) OFFLINE_STATUS_* flags returned here
|
||||
//
|
||||
// Returns:
|
||||
// S_OK File/directory is available offline, unless
|
||||
// OFFLINE_STATUS_INCOMPLETE is returned.
|
||||
// E_INVALIDARG Path is invalid, or not a net path
|
||||
// E_FAIL File/directory is not available offline
|
||||
//
|
||||
// Notes:
|
||||
// OFFLINE_STATUS_INCOMPLETE is never returned for directories.
|
||||
// Both OFFLINE_STATUS_LOCAL and OFFLINE_STATUS_REMOTE may be returned,
|
||||
// indicating "open in both places." This is common when the server is online.
|
||||
//
|
||||
function SHIsFileAvailableOffline(pwszPath:LPCWSTR; pdwStatus:LPDWORD):HRESULT; external 'shell32.dll' name 'SHIsFileAvailableOffline';
|
||||
|
||||
const
|
||||
OFFLINE_STATUS_LOCAL = $0001; { If open, it's open locally }
|
||||
OFFLINE_STATUS_REMOTE = $0002; { If open, it's open remotely }
|
||||
OFFLINE_STATUS_INCOMPLETE = $0004; { The local copy is currently incomplete. }
|
||||
{ The file will not be available offline }
|
||||
{ until it has been synchronized. }
|
||||
{ sets the specified path to use the string resource }
|
||||
{ as the UI instead of the file system name }
|
||||
|
||||
function SHSetLocalizedName(pszPath:LPWSTR; pszResModule:LPCWSTR; idsRes:longint):HRESULT;external 'shell32.dll' name 'SHSetLocalizedName';
|
||||
|
||||
//if _WIN32_IE >= 0x0600}
|
||||
|
||||
function SHEnumerateUnreadMailAccountsA(hKeyUser:HKEY; dwIndex:DWORD; pszMailAddress:LPSTR; cchMailAddress:longint):HRESULT;external 'shell32.dll' name 'SHEnumerateUnreadMailAccountsA';
|
||||
function SHEnumerateUnreadMailAccountsW(hKeyUser:HKEY; dwIndex:DWORD; pszMailAddress:LPWSTR; cchMailAddress:longint):HRESULT;external 'shell32.dll' name 'SHEnumerateUnreadMailAccountsW';
|
||||
|
||||
function SHEnumerateUnreadMailAccounts(hKeyUser:HKEY; dwIndex:DWORD; pszMailAddress:LPWSTR; cchMailAddress:longint):HRESULT;external 'shell32.dll' name 'SHEnumerateUnreadMailAccountsW';
|
||||
|
||||
function SHGetUnreadMailCountA(hKeyUser:HKEY; pszMailAddress:LPCSTR; pdwCount:PDWORD; pFileTime:PFILETIME; pszShellExecuteCommand:LPSTR;cchShellExecuteCommand:longint):HRESULT;external 'shell32.dll' name 'SHGetUnreadMailCountA';
|
||||
function SHGetUnreadMailCountW(hKeyUser:HKEY; pszMailAddress:LPCWSTR; pdwCount:PDWORD; pFileTime:PFILETIME; pszShellExecuteCommand:LPWSTR;cchShellExecuteCommand:longint):HRESULT;external 'shell32.dll' name 'SHGetUnreadMailCountW';
|
||||
function SHGetUnreadMailCount(hKeyUser:HKEY; pszMailAddress:LPCSTR; pdwCount:PDWORD; pFileTime:PFILETIME; pszShellExecuteCommand:LPSTR;cchShellExecuteCommand:longint):HRESULT;external 'shell32.dll' name 'SHGetUnreadMailCountA';
|
||||
function SHGetUnreadMailCount(hKeyUser:HKEY; pszMailAddress:LPCWSTR; pdwCount:PDWORD; pFileTime:PFILETIME; pszShellExecuteCommand:LPWSTR;cchShellExecuteCommand:longint):HRESULT;external 'shell32.dll' name 'SHGetUnreadMailCountW';
|
||||
|
||||
function SHSetUnreadMailCountA(pszMailAddress:LPCSTR; dwCount:DWORD; pszShellExecuteCommand:LPCSTR):HRESULT;external 'shell32.dll' name 'SHSetUnreadMailCountA';
|
||||
function SHSetUnreadMailCountW(pszMailAddress:LPCWSTR; dwCount:DWORD; pszShellExecuteCommand:LPCWSTR):HRESULT;external 'shell32.dll' name 'SHSetUnreadMailCountW';
|
||||
function SHSetUnreadMailCount(pszMailAddress:LPCSTR; dwCount:DWORD; pszShellExecuteCommand:LPCSTR):HRESULT;external 'shell32.dll' name 'SHSetUnreadMailCountA';
|
||||
function SHSetUnreadMailCount(pszMailAddress:LPCWSTR; dwCount:DWORD; pszShellExecuteCommand:LPCWSTR):HRESULT;external 'shell32.dll' name 'SHSetUnreadMailCountW';
|
||||
|
||||
// _WIN32_IE >= 0x0600 }
|
||||
// if _WIN32_IE >= 0x0600}
|
||||
|
||||
function SHGetImageList(iImageList:longint;CONST riid:TIID; ppvObj:Ppointer):HRESULT;external 'shell32.dll' name 'SHGetImageList';
|
||||
|
||||
Const
|
||||
SHIL_LARGE = 0; { normally 32x32 }
|
||||
SHIL_SMALL = 1; { normally 16x16 }
|
||||
SHIL_EXTRALARGE = 2;
|
||||
SHIL_SYSSMALL = 3; { like SHIL_SMALL, but tracks system small icon metric correctly }
|
||||
SHIL_LAST = SHIL_SYSSMALL;
|
||||
|
||||
{ Function call types for ntshrui folder sharing helpers }
|
||||
|
||||
//typedef HRESULT (STDMETHODCALLTYPE *PFNSHOWSHAREFOLDERUIW)(IN HWND hwndParent, IN LPCSTR pszPath);
|
||||
//typedef HRESULT (STDMETHODCALLTYPE *PFNSHOWSHAREFOLDERUIW)(IN HWND hwndParent, IN LPCWSTR pszPath);
|
||||
|
||||
implementation
|
||||
|
||||
function EIRESID(x : longint) : longint;
|
||||
Begin
|
||||
EIRESID:=-x;
|
||||
End;
|
||||
|
||||
end.
|
108
packages/winunits-base/src/shfolder.pp
Normal file
108
packages/winunits-base/src/shfolder.pp
Normal file
@ -0,0 +1,108 @@
|
||||
{
|
||||
This file is part of the Free Pascal run time library.
|
||||
Copyright (c) 1999-2000 by the Free Pascal development team
|
||||
|
||||
Interface to shfolder.dll
|
||||
|
||||
See the file COPYING.FPC, included in this distribution,
|
||||
for details about the copyright.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
**********************************************************************}
|
||||
|
||||
{ ---------------------------------------------------------------------
|
||||
shfolder.dll is distributed standard with IE5.5, so it should ship
|
||||
with 2000/XP or higher but is likely to be installed on NT/95/98 or
|
||||
ME as well. It works on all these systems.
|
||||
|
||||
The info found here is also in the registry:
|
||||
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\
|
||||
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\
|
||||
|
||||
Note that not all CSIDL_* constants are supported by shlfolder.dll,
|
||||
they should be supported by the shell32.dll, though again not on all
|
||||
systems.
|
||||
---------------------------------------------------------------------}
|
||||
|
||||
Unit shfolder;
|
||||
|
||||
Interface
|
||||
|
||||
Uses
|
||||
windows;
|
||||
|
||||
Const
|
||||
LibName = 'SHFolder.dll';
|
||||
|
||||
Const
|
||||
|
||||
CSIDL_PROGRAMS = $0002; { %SYSTEMDRIVE%\Program Files }
|
||||
CSIDL_PERSONAL = $0005; { %USERPROFILE%\My Documents }
|
||||
CSIDL_FAVORITES = $0006; { %USERPROFILE%\Favorites }
|
||||
CSIDL_STARTUP = $0007; { %USERPROFILE%\Start menu\Programs\Startup }
|
||||
CSIDL_RECENT = $0008; { %USERPROFILE%\Recent }
|
||||
CSIDL_SENDTO = $0009; { %USERPROFILE%\Sendto }
|
||||
CSIDL_STARTMENU = $000B; { %USERPROFILE%\Start menu }
|
||||
CSIDL_MYMUSIC = $000D; { %USERPROFILE%\Documents\My Music }
|
||||
CSIDL_MYVIDEO = $000E; { %USERPROFILE%\Documents\My Videos }
|
||||
CSIDL_DESKTOPDIRECTORY = $0010; { %USERPROFILE%\Desktop }
|
||||
CSIDL_NETHOOD = $0013; { %USERPROFILE%\NetHood }
|
||||
CSIDL_TEMPLATES = $0015; { %USERPROFILE%\Templates }
|
||||
CSIDL_COMMON_STARTMENU = $0016; { %PROFILEPATH%\All users\Start menu }
|
||||
CSIDL_COMMON_PROGRAMS = $0017; { %PROFILEPATH%\All users\Start menu\Programs }
|
||||
CSIDL_COMMON_STARTUP = $0018; { %PROFILEPATH%\All users\Start menu\Programs\Startup }
|
||||
CSIDL_COMMON_DESKTOPDIRECTORY = $0019; { %PROFILEPATH%\All users\Desktop }
|
||||
CSIDL_APPDATA = $001A; { %USERPROFILE%\Application Data (roaming) }
|
||||
CSIDL_PRINTHOOD = $001B; { %USERPROFILE%\Printhood }
|
||||
CSIDL_LOCAL_APPDATA = $001C; { %USERPROFILE%\Local Settings\Application Data (non roaming) }
|
||||
CSIDL_COMMON_FAVORITES = $001F; { %PROFILEPATH%\All users\Favorites }
|
||||
CSIDL_INTERNET_CACHE = $0020; { %USERPROFILE%\Local Settings\Temporary Internet Files }
|
||||
CSIDL_COOKIES = $0021; { %USERPROFILE%\Cookies }
|
||||
CSIDL_HISTORY = $0022; { %USERPROFILE%\Local settings\History }
|
||||
CSIDL_COMMON_APPDATA = $0023; { %PROFILESPATH%\All Users\Application Data }
|
||||
CSIDL_WINDOWS = $0024; { %SYSTEMROOT% }
|
||||
CSIDL_SYSTEM = $0025; { %SYSTEMROOT%\SYSTEM32 (may be system on 95/98/ME) }
|
||||
CSIDL_PROGRAM_FILES = $0026; { %SYSTEMDRIVE%\Program Files }
|
||||
CSIDL_MYPICTURES = $0027; { %USERPROFILE%\My Documents\My Pictures }
|
||||
CSIDL_PROFILE = $0028; { %USERPROFILE% }
|
||||
CSIDL_PROGRAM_FILES_COMMON = $002B; { %SYSTEMDRIVE%\Program Files\Common }
|
||||
CSIDL_COMMON_TEMPLATES = $002D; { %PROFILEPATH%\All Users\Templates }
|
||||
CSIDL_COMMON_DOCUMENTS = $002E; { %PROFILEPATH%\All Users\Documents }
|
||||
CSIDL_COMMON_ADMINTOOLS = $002F; { %PROFILEPATH%\All Users\Start Menu\Programs\Administrative Tools }
|
||||
CSIDL_ADMINTOOLS = $0030; { %USERPROFILE%\Start Menu\Programs\Administrative Tools }
|
||||
CSIDL_COMMON_MUSIC = $0035; { %PROFILEPATH%\All Users\Documents\my music }
|
||||
CSIDL_COMMON_PICTURES = $0036; { %PROFILEPATH%\All Users\Documents\my pictures }
|
||||
CSIDL_COMMON_VIDEO = $0037; { %PROFILEPATH%\All Users\Documents\my videos }
|
||||
CSIDL_CDBURN_AREA = $003B; { %USERPROFILE%\Local Settings\Application Data\Microsoft\CD Burning }
|
||||
CSIDL_PROFILES = $003E; { %PROFILEPATH% }
|
||||
|
||||
CSIDL_FLAG_CREATE = $8000; { (force creation of requested folder if it doesn't exist yet) }
|
||||
|
||||
{ Original entry points }
|
||||
|
||||
Function SHGetFolderPathA(Ahwnd: HWND; Csidl: Integer; Token: THandle; Flags: DWord; Path: PChar): HRESULT; stdcall; external LibName name 'SHGetFolderPathA';
|
||||
Function SHGetFolderPathW(Ahwnd: HWND; Csidl: Integer; Token: THandle; Flags: DWord; Path: PChar): HRESULT; stdcall; external LibName name 'SHGetFolderPathW';
|
||||
|
||||
Function SHGetFolderPath (Ahwnd: HWND; Csidl: Integer; Token: THandle; Flags: DWord; Path: PChar): HRESULT; stdcall; external LibName name 'SHGetFolderPathA';
|
||||
|
||||
|
||||
{ For Delphi compatibility }
|
||||
|
||||
type
|
||||
PFNSHGetFolderPathA = Function(Ahwnd: HWND; Csidl: Integer; Token: THandle; Flags: DWord; Path: PChar): HRESULT; stdcall;
|
||||
PFNSHGetFolderPathW = Function(Ahwnd: HWND; Csidl: Integer; Token: THandle; Flags: DWord; Path: PChar): HRESULT; stdcall;
|
||||
PFNSHGetFolderPath = PFNSHGetFolderPathA;
|
||||
|
||||
TSHGetFolderPathA = PFNSHGetFolderPathA;
|
||||
TSHGetFolderPathW = PFNSHGetFolderPathW;
|
||||
TSHGetFolderPath = TSHGetFolderPathA;
|
||||
|
||||
implementation
|
||||
|
||||
const
|
||||
SHFolderDll = 'SHFolder.dll';
|
||||
|
||||
end.
|
75
packages/winunits-base/src/shlobj.pp
Normal file
75
packages/winunits-base/src/shlobj.pp
Normal file
@ -0,0 +1,75 @@
|
||||
{
|
||||
This file is part of the Free Pascal run time library.
|
||||
Copyright (c) 2007 by Florian Klaempfl
|
||||
member of the Free Pascal development team.
|
||||
|
||||
See the file COPYING.FPC, included in this distribution,
|
||||
for details about the copyright.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
Original copyright statement follows.
|
||||
|
||||
}
|
||||
{$mode objfpc}
|
||||
unit shlobj;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
windows,activex;
|
||||
|
||||
type
|
||||
IEnumIDList = interface(IUnknown)
|
||||
['{000214F2-0000-0000-C000-000000000046}']
|
||||
function Next(celt: ULONG; out rgelt: PItemIDList; var pceltFetched: ULONG): HRESULT; stdcall;
|
||||
function Skip(celt: ULONG): HRESULT; stdcall; function Reset: HRESULT; stdcall;
|
||||
function Clone(out ppenum: IEnumIDList): HRESULT; stdcall;
|
||||
end;
|
||||
|
||||
IShellFolder = interface(IUnknown)
|
||||
['{000214E6-0000-0000-C000-000000000046}']
|
||||
function ParseDisplayName(hwndOwner: HWND; pbcReserved: Pointer; lpszDisplayName: POLESTR; out pchEaten: ULONG; out ppidl: PItemIDList; var dwAttributes: ULONG): HRESULT; stdcall;
|
||||
function EnumObjects(hwndOwner: HWND; grfFlags: DWORD; out EnumIDList: IEnumIDList): HRESULT; stdcall;
|
||||
function BindToObject(pidl: PItemIDList; pbcReserved: Pointer; const riid: TIID; out ppvOut): HRESULT; stdcall;
|
||||
function BindToStorage(pidl: PItemIDList; pbcReserved: Pointer; const riid: TIID; out ppvObj): HRESULT; stdcall;
|
||||
function CompareIDs(lParam: LPARAM; pidl1, pidl2: PItemIDList): HRESULT; stdcall;
|
||||
function CreateViewObject(hwndOwner: HWND; const riid: TIID; out ppvOut): HRESULT; stdcall;
|
||||
function GetAttributesOf(cidl: UINT; var apidl: PItemIDList; var rgfInOut: UINT): HRESULT; stdcall;
|
||||
function GetUIObjectOf(hwndOwner: HWND; cidl: UINT; var apidl: PItemIDList; const riid: TIID; prgfInOut: Pointer; out ppvOut): HRESULT; stdcall;
|
||||
function GetDisplayNameOf(pidl: PItemIDList; uFlags: DWORD; var lpName: TStrRet): HRESULT; stdcall;
|
||||
function SetNameOf(hwndOwner: HWND; pidl: PItemIDList; lpszName: POLEStr; uFlags: DWORD; var ppidlOut: PItemIDList): HRESULT; stdcall;
|
||||
end;
|
||||
|
||||
IAutoComplete = interface(IUnknown)
|
||||
['{00bb2762-6a77-11d0-a535-00c04fd7d062}']
|
||||
function Init(hwndEdit: HWND; punkACL: IUnknown; pwszRegKeyPath: LPCWSTR; pwszQuickComplete: LPCWSTR): HRESULT; stdcall;
|
||||
function Enable(fEnable: BOOL): HRESULT; stdcall;
|
||||
end;
|
||||
|
||||
const
|
||||
CLSID_AutoComplete: TGUID = '{00BB2763-6A77-11D0-A535-00C04FD7D062}';
|
||||
|
||||
const
|
||||
{ IAutoComplete2 options }
|
||||
ACO_NONE = 0;
|
||||
ACO_AUTOSUGGEST = $1;
|
||||
ACO_AUTOAPPEND = $2;
|
||||
ACO_SEARCH = $4;
|
||||
ACO_FILTERPREFIXES = $8;
|
||||
ACO_USETAB = $10;
|
||||
ACO_UPDOWNKEYDROPSLIST = $20;
|
||||
ACO_RTLREADING = $40;
|
||||
|
||||
type
|
||||
IAutoComplete2 = interface(IAutoComplete)
|
||||
['{EAC04BC0-3791-11d2-BB95-0060977B464C}']
|
||||
function SetOptions(dwFlag: DWORD): HRESULT; stdcall;
|
||||
function GetOptions(var dwFlag: DWORD): HRESULT; stdcall;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
75
packages/winunits-base/src/winver.pp
Normal file
75
packages/winunits-base/src/winver.pp
Normal file
@ -0,0 +1,75 @@
|
||||
{
|
||||
This file is part of the Free Pascal run time library.
|
||||
Copyright (c) 2003 by the Free Pascal development team
|
||||
|
||||
Windows Version detection functionality.
|
||||
|
||||
See the file COPYING.FPC, included in this distribution,
|
||||
for details about the copyright.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
**********************************************************************}
|
||||
|
||||
{$mode objfpc}
|
||||
unit winver;
|
||||
|
||||
Interface
|
||||
|
||||
Uses Windows;
|
||||
|
||||
const
|
||||
Win32Platform : Integer = 0;
|
||||
Win32MajorVersion : Integer = 0;
|
||||
Win32MinorVersion : Integer = 0;
|
||||
Win32BuildNumber : Integer = 0;
|
||||
|
||||
Win32CSDVersion : string = '';
|
||||
|
||||
function CheckWin32Version(Major,Minor : Integer ): Boolean;
|
||||
function CheckWin32Version(Major : Integer): Boolean;
|
||||
|
||||
Implementation
|
||||
|
||||
|
||||
uses sysutils;
|
||||
|
||||
procedure InitVersion;
|
||||
|
||||
var
|
||||
Info: TOSVersionInfo;
|
||||
|
||||
begin
|
||||
Info.dwOSVersionInfoSize := SizeOf(Info);
|
||||
if GetVersionEx(Info) then
|
||||
with Info do
|
||||
begin
|
||||
Win32Platform:=dwPlatformId;
|
||||
Win32MajorVersion:=dwMajorVersion;
|
||||
Win32MinorVersion:=dwMinorVersion;
|
||||
if (Win32Platform=VER_PLATFORM_WIN32_WINDOWS) then
|
||||
Win32BuildNumber:=dwBuildNumber and $FFFF
|
||||
else
|
||||
Win32BuildNumber := dwBuildNumber;
|
||||
Win32CSDVersion := StrPas(szCSDVersion);
|
||||
end;
|
||||
end;
|
||||
|
||||
function CheckWin32Version(Major : Integer): Boolean;
|
||||
|
||||
begin
|
||||
Result:=CheckWin32Version(Major,0)
|
||||
end;
|
||||
|
||||
function CheckWin32Version(Major,Minor: Integer): Boolean;
|
||||
|
||||
begin
|
||||
Result := (Win32MajorVersion>Major) or
|
||||
((Win32MajorVersion=Major) and (Win32MinorVersion>=Minor));
|
||||
end;
|
||||
|
||||
initialization
|
||||
InitVersion;
|
||||
end.
|
Loading…
Reference in New Issue
Block a user