ReactOS 0.4.15-dev-7788-g1ad9096
fusion.c File Reference
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
#include "fusion.h"
#include "wine/debug.h"
Include dependency graph for fusion.c:

Go to the source code of this file.

Macros

#define COBJMACROS
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (fusion)
 
HRESULT WINAPI InitializeFusion (void)
 
HRESULT WINAPI ClearDownloadCache (void)
 
HRESULT WINAPI CopyPDBs (void *unknown)
 
HRESULT WINAPI CreateInstallReferenceEnum (IInstallReferenceEnum **ppRefEnum, IAssemblyName *pName, DWORD dwFlags, LPVOID pvReserved)
 
HRESULT WINAPI CreateApplicationContext (IAssemblyName *name, void *ctx)
 
static HRESULT (WINAPI *pGetCORVersion)(LPWSTR pbuffer
 
static HRESULT get_corversion (LPWSTR version, DWORD size)
 
HRESULT WINAPI GetCachePath (ASM_CACHE_FLAGS dwCacheFlags, LPWSTR pwzCachePath, PDWORD pcchPath)
 

Variables

static DWORD cchBuffer
 
static DWORD DWORDdwLength
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 26 of file fusion.c.

Function Documentation

◆ ClearDownloadCache()

HRESULT WINAPI ClearDownloadCache ( void  )

Definition at line 50 of file fusion.c.

51{
52 FIXME("stub!\n");
53 return E_NOTIMPL;
54}
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ CopyPDBs()

HRESULT WINAPI CopyPDBs ( void unknown)

Definition at line 59 of file fusion.c.

60{
61 FIXME("(%p) stub!\n", unknown);
62 return E_NOTIMPL;
63}
static WCHAR unknown[MAX_STRING_RESOURCE_LEN]
Definition: object.c:1605

◆ CreateApplicationContext()

HRESULT WINAPI CreateApplicationContext ( IAssemblyName name,
void ctx 
)

Definition at line 79 of file fusion.c.

80{
81 FIXME("%p, %p\n", name, ctx);
82 return E_NOTIMPL;
83}
Definition: name.c:39

◆ CreateInstallReferenceEnum()

HRESULT WINAPI CreateInstallReferenceEnum ( IInstallReferenceEnum **  ppRefEnum,
IAssemblyName pName,
DWORD  dwFlags,
LPVOID  pvReserved 
)

Definition at line 68 of file fusion.c.

71{
72 FIXME("(%p, %p, %08x, %p) stub!\n", ppRefEnum, pName, dwFlags, pvReserved);
73 return E_NOTIMPL;
74}
static LPSTR pName
Definition: security.c:75
static LPCSTR DWORD void * pvReserved
Definition: str.c:196
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176

◆ get_corversion()

static HRESULT get_corversion ( LPWSTR  version,
DWORD  size 
)
static

Definition at line 88 of file fusion.c.

89{
91 HRESULT hr;
92 DWORD len;
93
94 hmscoree = LoadLibraryA("mscoree.dll");
95 if (!hmscoree)
96 return E_FAIL;
97
98 pGetCORVersion = (void *)GetProcAddress(hmscoree, "GetCORVersion");
99 if (!pGetCORVersion)
100 hr = E_FAIL;
101 else
102 hr = pGetCORVersion(version, size, &len);
103
105 return hr;
106}
#define E_FAIL
Definition: ddrawi.h:102
#define GetProcAddress(x, y)
Definition: compat.h:753
#define FreeLibrary(x)
Definition: compat.h:748
static const WCHAR version[]
Definition: asmname.c:66
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
Definition: loader.c:111
unsigned long DWORD
Definition: ntddk_ex.h:95
GLsizeiptr size
Definition: glext.h:5919
GLenum GLsizei len
Definition: glext.h:6722
static HMODULE hmscoree
Definition: fusion.c:24
HRESULT hr
Definition: shlfolder.c:183

Referenced by GetCachePath().

◆ GetCachePath()

HRESULT WINAPI GetCachePath ( ASM_CACHE_FLAGS  dwCacheFlags,
LPWSTR  pwzCachePath,
PDWORD  pcchPath 
)

Definition at line 111 of file fusion.c.

113{
114 static const WCHAR assembly[] = {'\\','a','s','s','e','m','b','l','y',0};
115 static const WCHAR gac[] = {'\\','G','A','C',0};
116 static const WCHAR nativeimg[] = {'N','a','t','i','v','e','I','m','a','g','e','s','_',0};
117 static const WCHAR dotnet[] = {'\\','M','i','c','r','o','s','o','f','t','.','N','E','T',0};
118#ifdef _WIN64
119 static const WCHAR zapfmt[] = {'%','s','\\','%','s','\\','%','s','%','s','_','6','4',0};
120#else
121 static const WCHAR zapfmt[] = {'%','s','\\','%','s','\\','%','s','%','s','_','3','2',0};
122#endif
124 DWORD len;
125 HRESULT hr = S_OK;
126
127 TRACE("(%08x, %p, %p)\n", dwCacheFlags, pwzCachePath, pcchPath);
128
129 if (!pcchPath)
130 return E_INVALIDARG;
131
133 lstrcpyW(path, windir);
134
135 switch (dwCacheFlags)
136 {
137 case ASM_CACHE_ZAP:
138 {
140 if (FAILED(hr))
141 return hr;
142
143 len = swprintf(path, zapfmt, windir, assembly + 1, nativeimg, version);
144 break;
145 }
146 case ASM_CACHE_GAC:
147 {
149 len += ARRAY_SIZE(assembly) - 1;
150 lstrcpyW(path + len, gac);
151 len += ARRAY_SIZE(gac) - 1;
152 break;
153 }
155 {
156 FIXME("Download cache not implemented\n");
157 return E_FAIL;
158 }
159 case ASM_CACHE_ROOT:
161 len += ARRAY_SIZE(assembly) - 1;
162 break;
164 lstrcpyW(path + len, dotnet);
165 len += ARRAY_SIZE(dotnet) - 1;
167 len += ARRAY_SIZE(assembly) - 1;
168 break;
169 default:
170 return E_INVALIDARG;
171 }
172
173 len++;
174 if (*pcchPath <= len || !pwzCachePath)
176 else if (pwzCachePath)
178
179 *pcchPath = len;
180 return hr;
181}
#define ARRAY_SIZE(A)
Definition: main.h:33
#define E_INVALIDARG
Definition: ddrawi.h:101
#define MAX_PATH
Definition: compat.h:34
#define lstrcpyW
Definition: compat.h:749
static HRESULT get_corversion(LPWSTR version, DWORD size)
Definition: fusion.c:88
UINT WINAPI GetWindowsDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
Definition: path.c:2352
#define swprintf
Definition: precomp.h:40
@ ASM_CACHE_ROOT
Definition: fusion.idl:31
@ ASM_CACHE_DOWNLOAD
Definition: fusion.idl:30
@ ASM_CACHE_ROOT_EX
Definition: fusion.idl:32
@ ASM_CACHE_GAC
Definition: fusion.idl:29
@ ASM_CACHE_ZAP
Definition: fusion.idl:28
#define S_OK
Definition: intsafe.h:52
#define FAILED(hr)
Definition: intsafe.h:51
static LPWSTR pwzCachePath
Definition: asmcache.c:747
static LPWSTR PDWORD pcchPath
Definition: asmcache.c:747
#define TRACE(s)
Definition: solgame.cpp:4
#define E_NOT_SUFFICIENT_BUFFER
Definition: winerror.h:2345
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by enumerate_gac().

◆ HRESULT()

static HRESULT ( WINAPI pGetCORVersion)
static

◆ InitializeFusion()

HRESULT WINAPI InitializeFusion ( void  )

Definition at line 41 of file fusion.c.

42{
43 FIXME("\n");
44 return S_OK;
45}

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( fusion  )

Variable Documentation

◆ cchBuffer

◆ dwLength

DWORD DWORD* dwLength

Definition at line 86 of file fusion.c.

Referenced by AddDesktopItemW(), AddItemW(), AddVolumeToList(), AppendStringToMultiSZ(), ApplyRegistryValues(), AVIFILE_FindStreamInTable(), AVISplitter_ProcessStreamList(), CheckForDeviceId(), CheckInfFile(), ClipboardReadBitmap(), ClipboardReadEnhMetafile(), ClipboardReadMemory(), ClipboardReadMemoryBlock(), ClipboardReadMetafile(), ClipboardReadPalette(), CM_Get_Child_Ex(), CM_Get_Parent_Ex(), CM_Get_Sibling_Ex(), ConInString(), ConMsgPrintf2V(), ConMsgPrintfV(), ConMsgPuts(), ConResMsgPrintfExV(), CreateProfile(), CreateStandardProfile(), CreateTempDir(), CreateUserProfileExW(), CryptProtectData(), CryptUnprotectData(), debug_init(), DECLARE_INTERFACE_(), DecrementRefCount(), DeleteProfileW(), DevicePathToDosPath(), FileAsyncReader_Request(), FillColorSchemeComboBox(), FindCurrentDriver(), FormatMessageSafeW(), get_object_dll_path(), get_threading_model(), GetAllUsersProfileDirectoryW(), GetBooleanValue(), GetCORSystemDirectory(), GetCORVersion(), GetCurrentHwProfileW(), GetDefaultUserProfileDirectoryW(), GetDesktopPath(), GetDWordValue(), GetExpandedFilePathName(), GetFileVersion(), GetInterfaceType(), GetInterruptType(), GetIntValue(), GetLongValue(), GetMemoryAccess(), GetMessageStringFromDll(), GetPortType(), GetProcessExecutablePath(), GetProcessExecutablePathById(), GetProfilesDirectoryW(), GetProfileType(), GetProgramsPath(), GetResourceType(), GetShareDisposition(), GetStringValue(), GetUserObjectSecurity(), GetUserProfileDirectoryW(), GetVersionFromProcess(), GetVolumeExtents(), IAVIEditStream_fnCut(), IncrementRefCount(), InitializeProfiles(), InitializeProgramFilesDir(), InstallNetDevice(), IntDeleteRecursive(), IStream_Create(), LoadSchemeFromReg(), LoadUserProfileW(), NetClassInstaller(), PrintPaddedMessageString(), ProcessPage_OnOpenFileLocation(), ProcessPage_OnProperties(), pSetupStringTableStringFromIdEx(), QueryNameServer(), RChangeServiceConfig2A(), ReadFromConsole(), ReadSettings(), RegEnumKeyA(), RegEnumKeyW(), RGetServiceDisplayNameA(), RGetServiceDisplayNameW(), RGetServiceKeyNameA(), RGetServiceKeyNameW(), RStartServiceA(), SetNewAccountName(), SetProfileData(), SETUP_CreateInterfaceList(), SETUP_GetClassIconInfo(), SETUP_GetIconIndex(), SETUP_GetValueString(), SETUPAPI_GetCurrentHwProfile(), SETUPDI_OpenDrvKey(), SetupDiCallClassInstaller(), SetupDiChangeState(), SetupDiClassGuidsFromNameExW(), SetupDiClassNameFromGuidExW(), SetupDiGetActualSectionToInstallExW(), SetupDiGetClassDescriptionExW(), SetupDiOpenDeviceInterfaceW(), SHGetUserSessionId(), SHOpenRegStream2A(), SHOpenRegStream2W(), SHTestTokenPrivilegeW(), START_TEST(), test_pack_MCI_DGV_LIST_PARMSA(), test_pack_MCI_DGV_LIST_PARMSW(), test_pack_MEMORYSTATUS(), test_pack_MEMORYSTATUSEX(), UnloadUserProfile(), UpdateUsersShellFolderSettings(), UserEnumDisplayDevices(), VirtualQuery(), VirtualQueryEx(), WhoamiGetTokenInfo(), WINTRUST_GetSignedMsgFromPEFile(), and wmain().