Home | Info | Community | Development | myReactOS | Contact Us
Definition at line 90 of file fusion.c.
Referenced by enumerate_gac().
{ WCHAR path[MAX_PATH]; WCHAR windir[MAX_PATH]; WCHAR version[MAX_PATH]; DWORD len; HRESULT hr = S_OK; static const WCHAR backslash[] = {'\\',0}; static const WCHAR assembly[] = {'a','s','s','e','m','b','l','y',0}; static const WCHAR gac[] = {'G','A','C',0}; static const WCHAR nativeimg[] = { 'N','a','t','i','v','e','I','m','a','g','e','s','_',0}; #ifdef _WIN64 static const WCHAR zapfmt[] = {'%','s','\\','%','s','\\','%','s','%','s','_','6','4',0}; #else static const WCHAR zapfmt[] = {'%','s','\\','%','s','\\','%','s','%','s','_','3','2',0}; #endif TRACE("(%08x, %p, %p)\n", dwCacheFlags, pwzCachePath, pcchPath); if (!pcchPath) return E_INVALIDARG; GetWindowsDirectoryW(windir, MAX_PATH); lstrcpyW(path, windir); lstrcatW(path, backslash); lstrcatW(path, assembly); switch (dwCacheFlags) { case ASM_CACHE_ZAP: { hr = get_corversion(version, MAX_PATH); if (FAILED(hr)) return hr; sprintfW(path, zapfmt, windir, assembly, nativeimg, version); break; } case ASM_CACHE_GAC: { lstrcatW(path, backslash); lstrcatW(path, gac); break; } case ASM_CACHE_DOWNLOAD: { FIXME("Download cache not implemented\n"); return E_FAIL; } case ASM_CACHE_ROOT: break; /* already set */ default: return E_INVALIDARG; } len = lstrlenW(path) + 1; if (*pcchPath <= len || !pwzCachePath) hr = HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER); else if (pwzCachePath) lstrcpyW(pwzCachePath, path); *pcchPath = len; return hr; }