mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-07 09:07:19 +01:00
* revert changes from r36770
* use constref for REFIID parameters, at least for non-interface functions (interface methods will be done separately as they're a breaking change, not to mention TObject's methods) git-svn-id: trunk@36806 -
This commit is contained in:
parent
4002833001
commit
0076284a86
@ -4588,8 +4588,8 @@ type
|
||||
{$endif wince}
|
||||
|
||||
type
|
||||
REFIID = ^TIID;
|
||||
TREFIID = ^TIID;
|
||||
REFIID = TIID;
|
||||
TREFIID = TIID;
|
||||
|
||||
{$ifndef wince}
|
||||
function SetErrorInfo(dwReserved:ULONG;errinfo:IErrorInfo):HResult;stdcall; external 'ole32.dll' name 'SetErrorInfo';
|
||||
|
||||
@ -750,7 +750,7 @@ CONST
|
||||
ILP_DOWNLEVEL = 1; // Write or reads the stream using downlevel sematics.
|
||||
|
||||
|
||||
function ImageList_ReadEx(dwFlags:DWORD;pstm:ISTREAM;riid:REFIID;ppv:PPointer):HRESULT; stdcall; external commctrldll name 'ImageList_ReadEx';
|
||||
function ImageList_ReadEx(dwFlags:DWORD;pstm:ISTREAM;constref riid:REFIID;ppv:PPointer):HRESULT; stdcall; external commctrldll name 'ImageList_ReadEx';
|
||||
function ImageList_WriteEx(himl:HIMAGELIST;dwFlags:DWORD;pstm:ISTREAM):HRESULT; stdcall; external commctrldll name 'ImageList_WriteEx';
|
||||
{$ENDIF}
|
||||
|
||||
|
||||
@ -81,7 +81,7 @@ function DllCanUnloadNow: HResult; stdcall;
|
||||
|
||||
//S_OK - The object was retrieved successfully.
|
||||
//CLASS_E_CLASSNOTAVAILABLE - The DLL does not support the class (object definition).
|
||||
function DllGetClassObject(const rclsid: REFIID {should be REFCLSID}; const riid: REFIID; out ppv: Pointer): HResult; stdcall;
|
||||
function DllGetClassObject(constref rclsid: REFIID {should be REFCLSID}; constref riid: REFIID; out ppv: Pointer): HResult; stdcall;
|
||||
|
||||
//S_OK - The registry entries were created successfully.
|
||||
//SELFREG_E_TYPELIB - The server was unable to complete the registration of all the type libraries used by its classes.
|
||||
@ -127,7 +127,7 @@ end;
|
||||
return hRes;
|
||||
*)
|
||||
|
||||
function DllGetClassObject(const rclsid: REFIID {should be REFCLSID}; const riid: REFIID; out ppv: Pointer): HResult; stdcall;
|
||||
function DllGetClassObject(constref rclsid: REFIID {should be REFCLSID}; constref riid: REFIID; out ppv: Pointer): HResult; stdcall;
|
||||
var
|
||||
factory: TComObjectFactory;
|
||||
begin
|
||||
@ -135,12 +135,12 @@ begin
|
||||
WriteLn('DllGetClassObject called: ', GUIDToString(rclsid), ' ', GUIDToString(riid));
|
||||
{$endif}
|
||||
|
||||
factory := ComClassManager.GetFactoryFromClassID(rclsid^);
|
||||
factory := ComClassManager.GetFactoryFromClassID(rclsid);
|
||||
if factory = nil then
|
||||
Result := CLASS_E_CLASSNOTAVAILABLE
|
||||
else
|
||||
begin
|
||||
if factory.GetInterface(riid^,ppv) then
|
||||
if factory.GetInterface(riid,ppv) then
|
||||
Result := S_OK
|
||||
else
|
||||
Result := CLASS_E_CLASSNOTAVAILABLE;
|
||||
|
||||
@ -2674,7 +2674,7 @@ Const External_Library = 'shell32';
|
||||
|
||||
function RestartDialog(hwnd:HWND; lpPrompt:lpcwstr; dwReturn:DWord):Longint;StdCall;external External_library name 'RestartDialog';
|
||||
function RestartDialogEx(hwnd:HWND; lpPrompt:lpcwstr; dwReturn:DWord; dwReasonCode:DWord):Longint;StdCall;external External_library name 'RestartDialogEx';
|
||||
function SHCoCreateInstance(pszCLSID:lpcwstr; pclsid:PCLSID; pUnkOuter:IUnknown; riid:TREFIID; ppv:Ppointer):HRESULT;StdCall;external External_library name 'SHCoCreateInstance';
|
||||
function SHCoCreateInstance(pszCLSID:lpcwstr; pclsid:PCLSID; pUnkOuter:IUnknown; constref riid:TREFIID; ppv:Ppointer):HRESULT;StdCall;external External_library name 'SHCoCreateInstance';
|
||||
// function CallCPLEntry16(hinst:HINSTANCE; lpfnEntry:TFARPROC16; hwndCPL:HWND; msg:UINT; lParam1:lparam; lParam2:lparam):LRESULT;StdCall;external External_library name 'CallCPLEntry16';
|
||||
function SHCreateStdEnumFmtEtc(cfmt:UINT; afmt:array of TFORMATETC; var ppenumFormatEtc:IEnumFORMATETC):HRESULT;StdCall;external External_library name 'SHCreateStdEnumFmtEtc';
|
||||
function SHDoDragDrop(hwnd:HWND; pdata:IDataObject; pdsrc:IDropSource; dwEffect:DWord; pdwEffect:PDWORD):HRESULT;StdCall;external External_library name 'SHDoDragDrop';
|
||||
@ -2788,7 +2788,7 @@ Const External_Library = 'shell32';
|
||||
function SHCreateShellFolderViewEx(pcsfv:LPCSFV; out ppsv:IShellView):HRESULT;StdCall;external External_library name 'SHCreateShellFolderViewEx';
|
||||
procedure SHGetSetSettings(lpss:LPSHELLSTATE; dwMask:DWord; bSet:BOOL);StdCall;external External_library name 'SHGetSetSettings';
|
||||
procedure SHGetSettings(lpsfs:LPSHELLFLAGSTATE; dwMask:DWord);StdCall;external External_library name 'SHGetSettings';
|
||||
function SHBindToParent(pidl:LPCITEMIDLIST; riid:TREFIID; ppv:Ppointer; var ppidlLast:LPCITEMIDLIST):HRESULT;StdCall;external External_library name 'SHBindToParent';
|
||||
function SHBindToParent(pidl:LPCITEMIDLIST; constref riid:TREFIID; ppv:Ppointer; var ppidlLast:LPCITEMIDLIST):HRESULT;StdCall;external External_library name 'SHBindToParent';
|
||||
function SHParseDisplayName(pszName:PCWSTR; pbc:IBindCtx; var ppidl:LPITEMIDLIST; sfgaoIn:TSFGAOF; psfgaoOut:PSFGAOF):HRESULT;StdCall;external External_library name 'SHParseDisplayName';
|
||||
function SHPathPrepareForWriteA(hwnd:HWND; punkEnableModless:IUnknown; pszPath:lpcstr; dwFlags:DWord):HRESULT;StdCall;external External_library name 'SHPathPrepareForWriteA';
|
||||
function SHPathPrepareForWriteW(hwnd:HWND; punkEnableModless:IUnknown; pszPath:lpcwstr; dwFlags:DWord):HRESULT;StdCall;external External_library name 'SHPathPrepareForWriteW';
|
||||
@ -2803,12 +2803,12 @@ Const External_Library = 'shell32';
|
||||
function SHPropStgWriteMultiple(pps:IPropertyStorage; puCodePage:PUINT; cpspec:ULONG; rgpspec:array of TPROPSPEC; rgvar:array of TPROPVARIANT;
|
||||
propidNameFirst:TPROPID):HRESULT;StdCall;external External_library name 'SHPropStgWriteMultiple';
|
||||
}
|
||||
function SHCreateFileExtractIconA(pszFile:lpcstr; dwFileAttributes:DWord; riid:TREFIID; ppv:Ppointer):HRESULT;StdCall;external External_library name 'SHCreateFileExtractIconA';
|
||||
function SHCreateFileExtractIconW(pszFile:lpcwstr; dwFileAttributes:DWord; riid:TREFIID; ppv:Ppointer):HRESULT;StdCall;external External_library name 'SHCreateFileExtractIconW';
|
||||
function SHCreateFileExtractIconA(pszFile:lpcstr; dwFileAttributes:DWord; constref riid:TREFIID; ppv:Ppointer):HRESULT;StdCall;external External_library name 'SHCreateFileExtractIconA';
|
||||
function SHCreateFileExtractIconW(pszFile:lpcwstr; dwFileAttributes:DWord; constref riid:TREFIID; ppv:Ppointer):HRESULT;StdCall;external External_library name 'SHCreateFileExtractIconW';
|
||||
{$ifdef Unicode}
|
||||
function SHCreateFileExtractIcon (pszFile:lpcwstr; dwFileAttributes:DWord; riid:TREFIID; ppv:Ppointer):HRESULT;StdCall;external External_library name 'SHCreateFileExtractIconW';
|
||||
function SHCreateFileExtractIcon (pszFile:lpcwstr; dwFileAttributes:DWord; constref riid:TREFIID; ppv:Ppointer):HRESULT;StdCall;external External_library name 'SHCreateFileExtractIconW';
|
||||
{$else}
|
||||
function SHCreateFileExtractIcon (pszFile:lpcstr; dwFileAttributes:DWord; riid:TREFIID; ppv:Ppointer):HRESULT;StdCall;external External_library name 'SHCreateFileExtractIconA';
|
||||
function SHCreateFileExtractIcon (pszFile:lpcstr; dwFileAttributes:DWord; constref riid:TREFIID; ppv:Ppointer):HRESULT;StdCall;external External_library name 'SHCreateFileExtractIconA';
|
||||
{$endif}
|
||||
function SHLimitInputEdit(hwndEdit:HWND; psf:IShellFolder):HRESULT;StdCall;external External_library name 'SHLimitInputEdit';
|
||||
function SHMultiFileProperties(pdtobj:IDataObject; dwFlags:DWord):HRESULT;StdCall;external External_library name 'SHMultiFileProperties';
|
||||
|
||||
@ -97,7 +97,7 @@ type
|
||||
|
||||
//#include "adshlp.h"
|
||||
|
||||
function ADsGetObject(lpszPathName: LPCWSTR; const riid: REFIID; out ppObject: Pointer): HRESULT; stdcall;
|
||||
function ADsGetObject(lpszPathName: LPCWSTR; constref riid: REFIID; out ppObject: Pointer): HRESULT; stdcall;
|
||||
{$EXTERNALSYM ADsGetObject}
|
||||
|
||||
function ADsBuildEnumerator(pADsContainer: IADsContainer; out ppEnumVariant: IEnumVARIANT): HRESULT; stdcall;
|
||||
@ -119,7 +119,7 @@ function ADsBuildVarArrayInt(lpdwObjectTypes: LPDWORD; dwObjectTypes: DWORD;
|
||||
{$EXTERNALSYM ADsBuildVarArrayInt}
|
||||
|
||||
function ADsOpenObject(lpszPathName, lpszUserName, lpszPassword: LPCWSTR;
|
||||
dwReserved: DWORD; const riid: REFIID; out ppObject: Pointer): HRESULT; stdcall;
|
||||
dwReserved: DWORD; constref riid: REFIID; out ppObject: Pointer): HRESULT; stdcall;
|
||||
{$EXTERNALSYM ADsOpenObject}
|
||||
|
||||
//
|
||||
|
||||
@ -109,7 +109,7 @@ const
|
||||
LIFF_FORCE_TEXT_FILTER_FALLBACK = 3;
|
||||
{$EXTERNALSYM LIFF_FORCE_TEXT_FILTER_FALLBACK}
|
||||
|
||||
function LoadIFilterEx(pwcsPath: PWCHAR; dwFlags: DWORD; const riid: REFIID; out ppIUnk: IUnknown): HRESULT; stdcall;
|
||||
function LoadIFilterEx(pwcsPath: PWCHAR; dwFlags: DWORD; constref riid: REFIID; out ppIUnk: IUnknown): HRESULT; stdcall;
|
||||
{$EXTERNALSYM LoadIFilterEx}
|
||||
|
||||
function BindIFilterFromStorage(pStg: IStorage; pUnkOuter: IUnknown; out ppIUnk: IFilter): HRESULT; stdcall;
|
||||
@ -414,7 +414,7 @@ function CIMakeICommand(out ppCommand: ICommand; cScope: ULONG; aDepths: LPDWORD
|
||||
//
|
||||
|
||||
function CICreateCommand(out ppCommand: IUnknown; pUnkOuter: IUnknown;
|
||||
const riid: REFIID; pwcsCatalog, pwcsMachine: PWCHAR): HRESULT; stdcall;
|
||||
constref riid: REFIID; pwcsCatalog, pwcsMachine: PWCHAR): HRESULT; stdcall;
|
||||
{$EXTERNALSYM CICreateCommand}
|
||||
|
||||
type
|
||||
|
||||
Loading…
Reference in New Issue
Block a user