shobjidl: use __forceinline

If the functions are not inlined, they introduce a dependency on ole32.dll or shell32.dll

git-svn-id: svn+ssh://svn.code.sf.net/p/mingw-w64/code/trunk@6379 4407c894-4637-0410-b4f5-ada5f102cad1
This commit is contained in:
Rafaël Carré 2013-11-18 21:36:18 +00:00
parent 84096e61be
commit 689a6c8552
2 changed files with 22 additions and 22 deletions

View File

@ -29950,7 +29950,7 @@ HRESULT __RPC_STUB IKnownFolderManager_Redirect_Stub(
#endif /* __IKnownFolderManager_INTERFACE_DEFINED__ */
__inline void FreeKnownFolderDefinitionFields(KNOWNFOLDER_DEFINITION *pKFD) {
__forceinline void FreeKnownFolderDefinitionFields(KNOWNFOLDER_DEFINITION *pKFD) {
CoTaskMemFree(pKFD->pszName);
CoTaskMemFree(pKFD->pszDescription);
CoTaskMemFree(pKFD->pszRelativePath);
@ -39343,11 +39343,11 @@ DEFINE_ENUM_FLAG_OPERATORS(LIBRARYMANAGEDIALOGOPTIONS)
SHSTDAPI SHShowManageLibraryUI(IShellItem *psiLibrary, HWND hwndOwner, LPCWSTR pszTitle, LPCWSTR pszInstruction, LIBRARYMANAGEDIALOGOPTIONS lmdOptions);
SHSTDAPI SHResolveLibrary(IShellItem *psiLibrary);
#if defined(__cplusplus) && !defined(CINTERFACE)
__inline HRESULT SHCreateLibrary(REFIID riid, void **ppv) {
__forceinline HRESULT SHCreateLibrary(REFIID riid, void **ppv) {
return CoCreateInstance(CLSID_ShellLibrary, NULL, CLSCTX_INPROC_SERVER, riid, ppv);
}
__inline HRESULT SHLoadLibraryFromItem(IShellItem *psiLibrary, DWORD grfMode, REFIID riid, void **ppv) {
__forceinline HRESULT SHLoadLibraryFromItem(IShellItem *psiLibrary, DWORD grfMode, REFIID riid, void **ppv) {
IShellLibrary *plib;
HRESULT hr;
@ -39362,7 +39362,7 @@ DEFINE_ENUM_FLAG_OPERATORS(LIBRARYMANAGEDIALOGOPTIONS)
return hr;
}
__inline HRESULT SHLoadLibraryFromKnownFolder(REFKNOWNFOLDERID kfidLibrary, DWORD grfMode, REFIID riid, void **ppv) {
__forceinline HRESULT SHLoadLibraryFromKnownFolder(REFKNOWNFOLDERID kfidLibrary, DWORD grfMode, REFIID riid, void **ppv) {
IShellLibrary *plib;
HRESULT hr;
@ -39377,7 +39377,7 @@ DEFINE_ENUM_FLAG_OPERATORS(LIBRARYMANAGEDIALOGOPTIONS)
return hr;
}
__inline HRESULT SHLoadLibraryFromParsingName(PCWSTR pszParsingName, DWORD grfMode, REFIID riid, void **ppv) {
__forceinline HRESULT SHLoadLibraryFromParsingName(PCWSTR pszParsingName, DWORD grfMode, REFIID riid, void **ppv) {
IShellItem *psiLibrary;
HRESULT hr;
@ -39390,7 +39390,7 @@ DEFINE_ENUM_FLAG_OPERATORS(LIBRARYMANAGEDIALOGOPTIONS)
return hr;
}
__inline HRESULT SHAddFolderPathToLibrary(IShellLibrary *plib, PCWSTR pszFolderPath) {
__forceinline HRESULT SHAddFolderPathToLibrary(IShellLibrary *plib, PCWSTR pszFolderPath) {
IShellItem *psiFolder;
HRESULT hr = SHCreateItemFromParsingName(pszFolderPath, NULL, IID_PPV_ARGS(&psiFolder));
@ -39401,7 +39401,7 @@ DEFINE_ENUM_FLAG_OPERATORS(LIBRARYMANAGEDIALOGOPTIONS)
return hr;
}
__inline HRESULT SHRemoveFolderPathFromLibrary(IShellLibrary *plib, PCWSTR pszFolderPath) {
__forceinline HRESULT SHRemoveFolderPathFromLibrary(IShellLibrary *plib, PCWSTR pszFolderPath) {
PIDLIST_ABSOLUTE pidlFolder = SHSimpleIDListFromPath(pszFolderPath);
HRESULT hr = pidlFolder ? S_OK : E_INVALIDARG;
@ -39418,7 +39418,7 @@ DEFINE_ENUM_FLAG_OPERATORS(LIBRARYMANAGEDIALOGOPTIONS)
return hr;
}
__inline HRESULT SHResolveFolderPathInLibrary(IShellLibrary *plib, PCWSTR pszFolderPath, DWORD dwTimeout, PWSTR *ppszResolvedPath) {
__forceinline HRESULT SHResolveFolderPathInLibrary(IShellLibrary *plib, PCWSTR pszFolderPath, DWORD dwTimeout, PWSTR *ppszResolvedPath) {
*ppszResolvedPath = NULL;
PIDLIST_ABSOLUTE pidlFolder = SHSimpleIDListFromPath(pszFolderPath);
HRESULT hr = pidlFolder ? S_OK : E_INVALIDARG;
@ -39441,7 +39441,7 @@ DEFINE_ENUM_FLAG_OPERATORS(LIBRARYMANAGEDIALOGOPTIONS)
return hr;
}
__inline HRESULT SHSaveLibraryInFolderPath(IShellLibrary *plib, PCWSTR pszFolderPath, PCWSTR pszLibraryName, LIBRARYSAVEFLAGS lsf, PWSTR *ppszSavedToPath) {
__forceinline HRESULT SHSaveLibraryInFolderPath(IShellLibrary *plib, PCWSTR pszFolderPath, PCWSTR pszLibraryName, LIBRARYSAVEFLAGS lsf, PWSTR *ppszSavedToPath) {
IShellItem *psiFolder;
HRESULT hr;
@ -40346,7 +40346,7 @@ void __RPC_STUB IFrameworkInputPane_Location_Stub(
#define PROP_CONTRACT_DELEGATE L"ContractDelegate"
#endif
__inline void SetContractDelegateWindow(HWND hwndSource, HWND hwndDelegate) {
__forceinline void SetContractDelegateWindow(HWND hwndSource, HWND hwndDelegate) {
if (hwndDelegate != NULL)
SetPropW (hwndSource, PROP_CONTRACT_DELEGATE, (HANDLE)hwndDelegate);
else
@ -40357,7 +40357,7 @@ void __RPC_STUB IFrameworkInputPane_Location_Stub(
#define PROP_CONTRACT_DELEGATE L"ContractDelegate"
#endif
__inline HWND GetContractDelegateWindow(HWND hwndSource) { return (HWND)GetPropW(hwndSource, PROP_CONTRACT_DELEGATE); }
__forceinline HWND GetContractDelegateWindow(HWND hwndSource) { return (HWND)GetPropW(hwndSource, PROP_CONTRACT_DELEGATE); }
#endif
#if NTDDI_VERSION >= NTDDI_WIN8

View File

@ -3310,7 +3310,7 @@ cpp_quote("")
}
cpp_quote("")
cpp_quote(" __inline void FreeKnownFolderDefinitionFields(KNOWNFOLDER_DEFINITION *pKFD) {")
cpp_quote(" __forceinline void FreeKnownFolderDefinitionFields(KNOWNFOLDER_DEFINITION *pKFD) {")
cpp_quote(" CoTaskMemFree(pKFD->pszName);")
cpp_quote(" CoTaskMemFree(pKFD->pszDescription);")
cpp_quote(" CoTaskMemFree(pKFD->pszRelativePath);")
@ -4292,11 +4292,11 @@ cpp_quote("")
cpp_quote(" SHSTDAPI SHShowManageLibraryUI(IShellItem *psiLibrary, HWND hwndOwner, LPCWSTR pszTitle, LPCWSTR pszInstruction, LIBRARYMANAGEDIALOGOPTIONS lmdOptions);")
cpp_quote(" SHSTDAPI SHResolveLibrary(IShellItem *psiLibrary);")
cpp_quote("#if defined(__cplusplus) && !defined(CINTERFACE)")
cpp_quote(" __inline HRESULT SHCreateLibrary(REFIID riid, void **ppv) {")
cpp_quote(" __forceinline HRESULT SHCreateLibrary(REFIID riid, void **ppv) {")
cpp_quote(" return CoCreateInstance(CLSID_ShellLibrary, NULL, CLSCTX_INPROC_SERVER, riid, ppv);")
cpp_quote(" }")
cpp_quote("")
cpp_quote(" __inline HRESULT SHLoadLibraryFromItem(IShellItem *psiLibrary, DWORD grfMode, REFIID riid, void **ppv) {")
cpp_quote(" __forceinline HRESULT SHLoadLibraryFromItem(IShellItem *psiLibrary, DWORD grfMode, REFIID riid, void **ppv) {")
cpp_quote(" IShellLibrary *plib;")
cpp_quote(" HRESULT hr;")
cpp_quote("")
@ -4311,7 +4311,7 @@ cpp_quote(" }")
cpp_quote(" return hr;")
cpp_quote(" }")
cpp_quote("")
cpp_quote(" __inline HRESULT SHLoadLibraryFromKnownFolder(REFKNOWNFOLDERID kfidLibrary, DWORD grfMode, REFIID riid, void **ppv) {")
cpp_quote(" __forceinline HRESULT SHLoadLibraryFromKnownFolder(REFKNOWNFOLDERID kfidLibrary, DWORD grfMode, REFIID riid, void **ppv) {")
cpp_quote(" IShellLibrary *plib;")
cpp_quote(" HRESULT hr;")
cpp_quote("")
@ -4326,7 +4326,7 @@ cpp_quote(" }")
cpp_quote(" return hr;")
cpp_quote(" }")
cpp_quote("")
cpp_quote(" __inline HRESULT SHLoadLibraryFromParsingName(PCWSTR pszParsingName, DWORD grfMode, REFIID riid, void **ppv) {")
cpp_quote(" __forceinline HRESULT SHLoadLibraryFromParsingName(PCWSTR pszParsingName, DWORD grfMode, REFIID riid, void **ppv) {")
cpp_quote(" IShellItem *psiLibrary;")
cpp_quote(" HRESULT hr;")
cpp_quote("")
@ -4339,7 +4339,7 @@ cpp_quote(" }")
cpp_quote(" return hr;")
cpp_quote(" }")
cpp_quote("")
cpp_quote(" __inline HRESULT SHAddFolderPathToLibrary(IShellLibrary *plib, PCWSTR pszFolderPath) {")
cpp_quote(" __forceinline HRESULT SHAddFolderPathToLibrary(IShellLibrary *plib, PCWSTR pszFolderPath) {")
cpp_quote(" IShellItem *psiFolder;")
cpp_quote(" HRESULT hr = SHCreateItemFromParsingName(pszFolderPath, NULL, IID_PPV_ARGS(&psiFolder));")
cpp_quote("")
@ -4350,7 +4350,7 @@ cpp_quote(" }")
cpp_quote(" return hr;")
cpp_quote(" }")
cpp_quote("")
cpp_quote(" __inline HRESULT SHRemoveFolderPathFromLibrary(IShellLibrary *plib, PCWSTR pszFolderPath) {")
cpp_quote(" __forceinline HRESULT SHRemoveFolderPathFromLibrary(IShellLibrary *plib, PCWSTR pszFolderPath) {")
cpp_quote(" PIDLIST_ABSOLUTE pidlFolder = SHSimpleIDListFromPath(pszFolderPath);")
cpp_quote(" HRESULT hr = pidlFolder ? S_OK : E_INVALIDARG;")
cpp_quote("")
@ -4367,7 +4367,7 @@ cpp_quote(" }")
cpp_quote(" return hr;")
cpp_quote(" }")
cpp_quote("")
cpp_quote(" __inline HRESULT SHResolveFolderPathInLibrary(IShellLibrary *plib, PCWSTR pszFolderPath, DWORD dwTimeout, PWSTR *ppszResolvedPath) {")
cpp_quote(" __forceinline HRESULT SHResolveFolderPathInLibrary(IShellLibrary *plib, PCWSTR pszFolderPath, DWORD dwTimeout, PWSTR *ppszResolvedPath) {")
cpp_quote(" *ppszResolvedPath = NULL;")
cpp_quote(" PIDLIST_ABSOLUTE pidlFolder = SHSimpleIDListFromPath(pszFolderPath);")
cpp_quote(" HRESULT hr = pidlFolder ? S_OK : E_INVALIDARG;")
@ -4390,7 +4390,7 @@ cpp_quote(" }")
cpp_quote(" return hr;")
cpp_quote(" }")
cpp_quote("")
cpp_quote(" __inline HRESULT SHSaveLibraryInFolderPath(IShellLibrary *plib, PCWSTR pszFolderPath, PCWSTR pszLibraryName, LIBRARYSAVEFLAGS lsf, PWSTR *ppszSavedToPath) {")
cpp_quote(" __forceinline HRESULT SHSaveLibraryInFolderPath(IShellLibrary *plib, PCWSTR pszFolderPath, PCWSTR pszLibraryName, LIBRARYSAVEFLAGS lsf, PWSTR *ppszSavedToPath) {")
cpp_quote(" IShellItem *psiFolder;")
cpp_quote(" HRESULT hr;")
cpp_quote("")
@ -4492,7 +4492,7 @@ cpp_quote("#ifndef PROP_CONTRACT_DELEGATE")
cpp_quote("#define PROP_CONTRACT_DELEGATE L\"ContractDelegate\"")
cpp_quote("#endif")
cpp_quote("")
cpp_quote(" __inline void SetContractDelegateWindow(HWND hwndSource, HWND hwndDelegate) {")
cpp_quote(" __forceinline void SetContractDelegateWindow(HWND hwndSource, HWND hwndDelegate) {")
cpp_quote(" if (hwndDelegate != NULL)")
cpp_quote(" SetPropW (hwndSource, PROP_CONTRACT_DELEGATE, (HANDLE)hwndDelegate);")
cpp_quote(" else")
@ -4503,7 +4503,7 @@ cpp_quote("#ifndef PROP_CONTRACT_DELEGATE")
cpp_quote("#define PROP_CONTRACT_DELEGATE L\"ContractDelegate\"")
cpp_quote("#endif")
cpp_quote("")
cpp_quote(" __inline HWND GetContractDelegateWindow(HWND hwndSource) { return (HWND)GetPropW(hwndSource, PROP_CONTRACT_DELEGATE); }")
cpp_quote(" __forceinline HWND GetContractDelegateWindow(HWND hwndSource) { return (HWND)GetPropW(hwndSource, PROP_CONTRACT_DELEGATE); }")
cpp_quote("#endif")
cpp_quote("")