1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: shutil.h,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
44 #define PROTOCOL_FILE "file:"
45 #define MAX_URL (MAX_PATH + sizeof(PROTOCOL_FILE))
47 #define SHUTIL_TO_DELIVER
49 //--------------------------------------------------------------------------
51 void * WINAPI
WIN_SHAlloc( ULONG cb
);
52 void * WINAPI
WIN_SHRealloc( void *pv
, ULONG cb
);
53 void WINAPI
WIN_SHFree( void *pv
);
55 //--------------------------------------------------------------------------
57 ULONG WINAPI
WIN_SHGetIDListSize( LPCITEMIDLIST pidl
);
58 BOOL WINAPI
WIN_SHCloneIDList( LPCITEMIDLIST pidl
, LPITEMIDLIST
*ppidl
);
59 BOOL WINAPI
WIN_SHAppendIDList( LPCITEMIDLIST pidl
, LPITEMIDLIST
*ppidl
);
60 LONG WINAPI
WIN_SHCompareIDList( LPCITEMIDLIST pidl1
, LPCITEMIDLIST pidl2
);
62 LONG WINAPI
WIN_SHGetIDListTokenCount( LPCITEMIDLIST pidl
);
63 BOOL WINAPI
WIN_SHGetIDListToken( LPCITEMIDLIST pidl
, ULONG nToken
, LPITEMIDLIST
*ppidl
);
65 BOOL WINAPI
WIN_SHSplitIDList(
67 LPITEMIDLIST
* pidlFolder
,
68 LPITEMIDLIST
* pidlItem
71 BOOL WINAPI
WIN_SHSplitIDListEx(
73 LPITEMIDLIST
* pidlParent
,
74 LPITEMIDLIST
* pidlChild
,
78 //--------------------------------------------------------------------------
80 #define WIN_SHGetSpecialFolderLocation( nFolder, ppidl ) \
81 ((BOOL)(NOERROR == SHGetSpecialFolderLocation( GetFocus(), nFolder, ppidl )))
83 #define WIN_SHGetPathFromIDList( pidl, pszPath ) \
84 SHGetPathFromIDList( pidl, pszPath )
86 // #define SHGP_CLSID 0x00000001
88 // BOOL WINAPI WIN_SHGetPathFromIDListEx( LPCITEMIDLIST pidl, LPSTR pszBuffer, UINT uFlags );
90 BOOL WINAPI
WIN_SHGetIDListFromPath( LPCSTR pszPath
, LPITEMIDLIST
*ppidl
);
92 BOOL WINAPI
WIN_SHGetPathFromURL( LPCSTR pszURL
, LPSTR pszPath
);
93 BOOL WINAPI
WIN_SHGetURLFromPath( LPCSTR pszPath
, LPSTR pszURL
);
95 BOOL WINAPI
WIN_SHGetFolderFromIDList( LPCITEMIDLIST pidl
, LPSHELLFOLDER
*ppshf
);
96 BOOL WINAPI
WIN_SHGetSpecialFolder( int nFolder
, LPSHELLFOLDER
*ppshf
);
97 BOOL WINAPI
WIN_SHGetFolderFromPath( LPCSTR pszPath
, LPSHELLFOLDER
*ppshf
);
99 BOOL WINAPI
WIN_SHGetSpecialFolderPath( int nFolder
, LPSTR pszPath
);
101 HRESULT WINAPI
WIN_SHGetDataFromIDList(
110 //--------------------------------------------------------------------------
112 #define SHIC_PIDL 0x00000001
113 #define SHIC_NO_UI 0x00000002
115 #define CMDSTR_OPENA "open"
116 #define CMDSTR_EXPLOREA "explore"
117 #define CMDSTR_FINDA "find"
119 #define CMDSTR_OPENW L"open"
120 #define CMDSTR_EXPLOREW L"explore"
121 #define CMDSTR_FINDW L"find"
124 #define CMDSTR_OPEN CMDSTR_OPENW
125 #define CMDSTR_EXPLORE CMDSTR_EXPLOREW
126 #define CMDSTR_FIND CMDSTR_FINDW
128 #define CMDSTR_OPEN CMDSTR_OPENA
129 #define CMDSTR_EXPLORE CMDSTR_EXPLOREA
130 #define CMDSTR_FIND CMDSTR_FINDA
133 #define CMDSTR_DEFAULT MAKEINTRESOURCE(0x00)
135 #define CMDSTR_LINK MAKEINTRESOURCE(0x10)
136 #define CMDSTR_DELETE MAKEINTRESOURCE(0x11)
137 #define CMDSTR_RENAME MAKEINTRESOURCE(0x12)
138 #define CMDSTR_PROPERTIES MAKEINTRESOURCE(0x13)
139 #define CMDSTR_CUT MAKEINTRESOURCE(0x18)
140 #define CMDSTR_COPY MAKEINTRESOURCE(0x19)
142 BOOL WINAPI
WIN_SHInvokeCommand(
152 //--------------------------------------------------------------------------
154 BOOL WINAPI
WIN_SHStrRetToMultiByte(
161 DWORD
WIN_SHBuildCRC( LPVOID pBytes
, ULONG nBytes
);
163 DWORD WINAPI
WIN_GetShellVersion(VOID
);
165 HIMAGELIST WINAPI
WIN_SHGetSystemImageList( UINT uFlags
);
167 //--------------------------------------------------------------------------
171 ULONG WINAPI WIN_CreateStringFromBinary (
178 ULONG WINAPI WIN_CreateBinaryFromString(
185 //--------------------------------------------------------------------------
187 DWORD WINAPI
WIN_SHSetValue(
196 DWORD WINAPI
WIN_SHGetValue(
205 DWORD WINAPI
WIN_SHDeleteValue(