| 1655 | } |
| 1656 | |
| 1657 | static HRESULT WINAPI SHGetFolderPathA_Hook(HWND hwnd, int csidl, HANDLE hToken, DWORD dwFlags, LPSTR pszPath) |
| 1658 | { |
| 1659 | BOOL shouldRedirect = (csidl == (CSIDL_COMMON_DOCUMENTS | CSIDL_FLAG_CREATE)); |
| 1660 | |
| 1661 | HRESULT hr = ori_SHGetFolderPathA(hwnd, shouldRedirect ? (CSIDL_MYDOCUMENTS | CSIDL_FLAG_CREATE) : csidl, hToken, dwFlags, pszPath); |
| 1662 | |
| 1663 | if (SUCCEEDED(hr) && shouldRedirect) |
| 1664 | { |
| 1665 | if (PathAppendA(pszPath, "My Games") == FALSE) |
| 1666 | { |
| 1667 | return E_FAIL; |
| 1668 | } |
| 1669 | } |
| 1670 | |
| 1671 | return hr; |
| 1672 | } |
| 1673 | |
| 1674 | static BOOL WINAPI AdjustWindowRect_Hook(LPRECT lpRect, DWORD dwStyle, BOOL bMenu) |
| 1675 | { |
nothing calls this directly
no outgoing calls
no test coverage detected