ReactOS  0.4.14-dev-49-gfb4591c
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 "wine/unicode.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 23 of file fusion.c.

Function Documentation

◆ ClearDownloadCache()

HRESULT WINAPI ClearDownloadCache ( void  )

Definition at line 48 of file fusion.c.

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

◆ CopyPDBs()

HRESULT WINAPI CopyPDBs ( void unknown)

Definition at line 57 of file fusion.c.

58 {
59  FIXME("(%p) stub!\n", unknown);
60  return E_NOTIMPL;
61 }
#define FIXME(fmt,...)
Definition: debug.h:110
Definition: id3.c:18
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ CreateApplicationContext()

HRESULT WINAPI CreateApplicationContext ( IAssemblyName name,
void ctx 
)

Definition at line 77 of file fusion.c.

78 {
79  FIXME("%p, %p\n", name, ctx);
80  return E_NOTIMPL;
81 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
Definition: name.c:36

◆ CreateInstallReferenceEnum()

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

Definition at line 66 of file fusion.c.

69 {
70  FIXME("(%p, %p, %08x, %p) stub!\n", ppRefEnum, pName, dwFlags, pvReserved);
71  return E_NOTIMPL;
72 }
#define FIXME(fmt,...)
Definition: debug.h:110
static LPSTR pName
Definition: security.c:75
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
#define E_NOTIMPL
Definition: ddrawi.h:99
static LPCWSTR LPVOID pvReserved
Definition: fusion.c:28

◆ get_corversion()

static HRESULT get_corversion ( LPWSTR  version,
DWORD  size 
)
static

Definition at line 86 of file fusion.c.

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

Referenced by GetCachePath().

◆ GetCachePath()

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

Definition at line 109 of file fusion.c.

111 {
112  static const WCHAR assembly[] = {'\\','a','s','s','e','m','b','l','y',0};
113  static const WCHAR gac[] = {'\\','G','A','C',0};
114  static const WCHAR nativeimg[] = {'N','a','t','i','v','e','I','m','a','g','e','s','_',0};
115  static const WCHAR dotnet[] = {'\\','M','i','c','r','o','s','o','f','t','.','N','E','T',0};
116 #ifdef _WIN64
117  static const WCHAR zapfmt[] = {'%','s','\\','%','s','\\','%','s','%','s','_','6','4',0};
118 #else
119  static const WCHAR zapfmt[] = {'%','s','\\','%','s','\\','%','s','%','s','_','3','2',0};
120 #endif
122  DWORD len;
123  HRESULT hr = S_OK;
124 
125  TRACE("(%08x, %p, %p)\n", dwCacheFlags, pwzCachePath, pcchPath);
126 
127  if (!pcchPath)
128  return E_INVALIDARG;
129 
130  len = GetWindowsDirectoryW(windir, MAX_PATH);
131  strcpyW(path, windir);
132 
133  switch (dwCacheFlags)
134  {
135  case ASM_CACHE_ZAP:
136  {
138  if (FAILED(hr))
139  return hr;
140 
141  len = sprintfW(path, zapfmt, windir, assembly + 1, nativeimg, version);
142  break;
143  }
144  case ASM_CACHE_GAC:
145  {
146  strcpyW(path + len, assembly);
147  len += ARRAY_SIZE(assembly) - 1;
148  strcpyW(path + len, gac);
149  len += ARRAY_SIZE(gac) - 1;
150  break;
151  }
152  case ASM_CACHE_DOWNLOAD:
153  {
154  FIXME("Download cache not implemented\n");
155  return E_FAIL;
156  }
157  case ASM_CACHE_ROOT:
158  strcpyW(path + len, assembly);
159  len += ARRAY_SIZE(assembly) - 1;
160  break;
161  case ASM_CACHE_ROOT_EX:
162  strcpyW(path + len, dotnet);
163  len += ARRAY_SIZE(dotnet) - 1;
164  strcpyW(path + len, assembly);
165  len += ARRAY_SIZE(assembly) - 1;
166  break;
167  default:
168  return E_INVALIDARG;
169  }
170 
171  len++;
172  if (*pcchPath <= len || !pwzCachePath)
174  else if (pwzCachePath)
176 
177  *pcchPath = len;
178  return hr;
179 }
HRESULT hr
Definition: shlfolder.c:183
#define E_FAIL
Definition: ddrawi.h:102
UINT WINAPI GetWindowsDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
Definition: path.c:2351
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_INVALIDARG
Definition: ddrawi.h:101
static const WCHAR version[]
Definition: asmname.c:64
static LPWSTR pwzCachePath
Definition: fusion.c:27
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:77
#define MAX_PATH
Definition: compat.h:26
unsigned long DWORD
Definition: ntddk_ex.h:95
GLenum GLsizei len
Definition: glext.h:6722
#define E_NOT_SUFFICIENT_BUFFER
Definition: winerror.h:2345
static LPWSTR PDWORD pcchPath
Definition: fusion.c:27
#define S_OK
Definition: intsafe.h:59
WINE_UNICODE_INLINE WCHAR * strcpyW(WCHAR *dst, const WCHAR *src)
Definition: unicode.h:219
#define ARRAY_SIZE(a)
Definition: main.h:24
Definition: services.c:325
#define sprintfW
Definition: unicode.h:58
static HRESULT get_corversion(LPWSTR version, DWORD size)
Definition: fusion.c:86

Referenced by enumerate_gac().

◆ HRESULT()

static HRESULT ( WINAPI pGetCORVersion)
static

◆ InitializeFusion()

HRESULT WINAPI InitializeFusion ( void  )

Definition at line 39 of file fusion.c.

40 {
41  FIXME("\n");
42  return S_OK;
43 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define S_OK
Definition: intsafe.h:59

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( fusion  )

Variable Documentation

◆ cchBuffer

◆ dwLength

DWORD DWORD* dwLength

Definition at line 83 of file fusion.c.

Referenced by AddDesktopItemW(), AddItemW(), AllowWinstaAccess(), 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(), FileAsyncReader_Request(), FillColorSchemeComboBox(), FindCurrentDriver(), FormatMessageSafeW(), get_object_dll_path(), get_threading_model(), GetAllUsersProfileDirectoryW(), GetBooleanValue(), GetCORSystemDirectory(), GetCORVersion(), GetCurrentHwProfileW(), GetDefaultUserProfileDirectoryW(), GetDesktopPath(), GetDWordValue(), GetExpandedFilePathName(), GetFileVersion(), GetInterfaceType(), GetIntValue(), GetLongValue(), GetMessageStringFromDll(), GetProfilesDirectoryW(), GetProfileType(), GetProgramsPath(), GetStringValue(), GetUserObjectSecurity(), GetUserProfileDirectoryW(), GetVersionFromProcess(), IAVIEditStream_fnCut(), IncrementRefCount(), InitializeProfiles(), InitializeProgramFilesDir(), InstallNetDevice(), IntCreateAliasHeader(), IntDeleteRecursive(), IStream_Create(), LoadSchemeFromReg(), LoadUserProfileW(), NetClassInstaller(), PrintPaddedMessageString(), pSetupStringTableStringFromIdEx(), QueryNameServer(), RChangeServiceConfig2A(), ReadFromConsole(), ReadSettings(), RegEnumKeyA(), RegEnumKeyW(), RGetServiceDisplayNameA(), RGetServiceDisplayNameW(), RGetServiceKeyNameA(), RGetServiceKeyNameW(), RStartServiceA(), SetProfileData(), SETUP_CreateDevicesList(), SETUP_CreateDevicesListFromEnumerator(), SETUP_CreateInterfaceList(), SETUP_GetClassIconInfo(), SETUP_GetIconIndex(), SETUP_GetValueString(), SETUPAPI_GetCurrentHwProfile(), SETUPDI_OpenDrvKey(), SetupDiBuildClassInfoListExW(), SetupDiCallClassInstaller(), SetupDiChangeState(), SetupDiClassGuidsFromNameExW(), SetupDiClassNameFromGuidExW(), SetupDiGetActualSectionToInstallExW(), SetupDiGetClassDescriptionExW(), SetupDiOpenDeviceInterfaceW(), SHOpenRegStream2A(), SHOpenRegStream2W(), test_pack_MEMORYSTATUS(), test_pack_MEMORYSTATUSEX(), UnloadUserProfile(), UpdateUsersShellFolderSettings(), VirtualQuery(), VirtualQueryEx(), WhoamiGetTokenInfo(), and WINTRUST_GetSignedMsgFromPEFile().