Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
9e20c21d
Commit
9e20c21d
authored
Oct 05, 2010
by
Vincent Povirk
Committed by
Alexandre Julliard
Nov 11, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mscoree: Add stub implementation of IMetaDataDispenserEx.
parent
6ad97b7c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
226 additions
and
1 deletion
+226
-1
Makefile.in
dlls/mscoree/Makefile.in
+1
-0
corruntimehost.c
dlls/mscoree/corruntimehost.c
+21
-1
metadata.c
dlls/mscoree/metadata.c
+202
-0
mscoree_private.h
dlls/mscoree/mscoree_private.h
+2
-0
No files found.
dlls/mscoree/Makefile.in
View file @
9e20c21d
...
...
@@ -5,6 +5,7 @@ C_SRCS = \
assembly.c
\
config.c
\
corruntimehost.c
\
metadata.c
\
metahost.c
\
mscoree_main.c
...
...
dlls/mscoree/corruntimehost.c
View file @
9e20c21d
...
...
@@ -618,16 +618,36 @@ HRESULT RuntimeHost_Construct(const CLRRuntimeInfo *runtime_version,
HRESULT
RuntimeHost_GetInterface
(
RuntimeHost
*
This
,
REFCLSID
clsid
,
REFIID
riid
,
void
**
ppv
)
{
IUnknown
*
unk
;
HRESULT
hr
;
if
(
IsEqualGUID
(
clsid
,
&
CLSID_CorRuntimeHost
))
{
unk
=
(
IUnknown
*
)
&
This
->
lpVtbl
;
IUnknown_AddRef
(
unk
);
}
else
if
(
IsEqualGUID
(
clsid
,
&
CLSID_CLRRuntimeHost
))
{
unk
=
(
IUnknown
*
)
&
This
->
lpCLRHostVtbl
;
IUnknown_AddRef
(
unk
);
}
else
if
(
IsEqualGUID
(
clsid
,
&
CLSID_CorMetaDataDispenser
)
||
IsEqualGUID
(
clsid
,
&
CLSID_CorMetaDataDispenserRuntime
))
{
hr
=
MetaDataDispenser_CreateInstance
(
&
unk
);
if
(
FAILED
(
hr
))
return
hr
;
}
else
unk
=
NULL
;
if
(
unk
)
return
IUnknown_QueryInterface
(
unk
,
riid
,
ppv
);
{
hr
=
IUnknown_QueryInterface
(
unk
,
riid
,
ppv
);
IUnknown_Release
(
unk
);
return
hr
;
}
else
FIXME
(
"not implemented for class %s
\n
"
,
debugstr_guid
(
clsid
));
...
...
dlls/mscoree/metadata.c
0 → 100644
View file @
9e20c21d
/*
* IMetaDataDispenserEx - dynamic creation/editing of assemblies
*
* Copyright 2010 Vincent Povirk for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdio.h>
#include <stdarg.h>
#include <assert.h>
#define COBJMACROS
#include "wine/library.h"
#include "windef.h"
#include "winbase.h"
#include "winreg.h"
#include "ole2.h"
#include "cor.h"
#include "metahost.h"
#include "wine/list.h"
#include "mscoree_private.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
mscoree
);
typedef
struct
MetaDataDispenser
{
const
struct
IMetaDataDispenserExVtbl
*
lpVtbl
;
LONG
ref
;
}
MetaDataDispenser
;
static
HRESULT
WINAPI
MetaDataDispenser_QueryInterface
(
IMetaDataDispenserEx
*
iface
,
REFIID
riid
,
void
**
ppvObject
)
{
TRACE
(
"%p %s %p
\n
"
,
iface
,
debugstr_guid
(
riid
),
ppvObject
);
if
(
IsEqualGUID
(
riid
,
&
IID_IMetaDataDispenserEx
)
||
IsEqualGUID
(
riid
,
&
IID_IMetaDataDispenser
)
||
IsEqualGUID
(
riid
,
&
IID_IUnknown
))
{
*
ppvObject
=
iface
;
}
else
{
FIXME
(
"Unsupported interface %s
\n
"
,
debugstr_guid
(
riid
));
return
E_NOINTERFACE
;
}
IMetaDataDispenserEx_AddRef
(
iface
);
return
S_OK
;
}
static
ULONG
WINAPI
MetaDataDispenser_AddRef
(
IMetaDataDispenserEx
*
iface
)
{
MetaDataDispenser
*
This
=
(
MetaDataDispenser
*
)
iface
;
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"%p ref=%u
\n
"
,
This
,
ref
);
MSCOREE_LockModule
();
return
ref
;
}
static
ULONG
WINAPI
MetaDataDispenser_Release
(
IMetaDataDispenserEx
*
iface
)
{
MetaDataDispenser
*
This
=
(
MetaDataDispenser
*
)
iface
;
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"%p ref=%u
\n
"
,
This
,
ref
);
if
(
ref
==
0
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
MSCOREE_UnlockModule
();
return
ref
;
}
static
HRESULT
WINAPI
MetaDataDispenser_DefineScope
(
IMetaDataDispenserEx
*
iface
,
REFCLSID
rclsid
,
DWORD
dwCreateFlags
,
REFIID
riid
,
IUnknown
**
ppIUnk
)
{
FIXME
(
"%p %s %x %s %p
\n
"
,
iface
,
debugstr_guid
(
rclsid
),
dwCreateFlags
,
debugstr_guid
(
riid
),
ppIUnk
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
MetaDataDispenser_OpenScope
(
IMetaDataDispenserEx
*
iface
,
LPCWSTR
szScope
,
DWORD
dwOpenFlags
,
REFIID
riid
,
IUnknown
**
ppIUnk
)
{
FIXME
(
"%p %s %x %s %p
\n
"
,
iface
,
debugstr_w
(
szScope
),
dwOpenFlags
,
debugstr_guid
(
riid
),
ppIUnk
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
MetaDataDispenser_OpenScopeOnMemory
(
IMetaDataDispenserEx
*
iface
,
const
void
*
pData
,
ULONG
cbData
,
DWORD
dwOpenFlags
,
REFIID
riid
,
IUnknown
**
ppIUnk
)
{
FIXME
(
"%p %p %u %x %s %p
\n
"
,
iface
,
pData
,
cbData
,
dwOpenFlags
,
debugstr_guid
(
riid
),
ppIUnk
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
MetaDataDispenser_SetOption
(
IMetaDataDispenserEx
*
iface
,
REFGUID
optionid
,
const
VARIANT
*
value
)
{
FIXME
(
"%p %s
\n
"
,
iface
,
debugstr_guid
(
optionid
));
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
MetaDataDispenser_GetOption
(
IMetaDataDispenserEx
*
iface
,
REFGUID
optionid
,
VARIANT
*
pvalue
)
{
FIXME
(
"%p %s
\n
"
,
iface
,
debugstr_guid
(
optionid
));
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
MetaDataDispenser_OpenScopeOnITypeInfo
(
IMetaDataDispenserEx
*
iface
,
ITypeInfo
*
pITI
,
DWORD
dwOpenFlags
,
REFIID
riid
,
IUnknown
**
ppIUnk
)
{
FIXME
(
"%p %p %u %s %p
\n
"
,
iface
,
pITI
,
dwOpenFlags
,
debugstr_guid
(
riid
),
ppIUnk
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
MetaDataDispenser_GetCORSystemDirectory
(
IMetaDataDispenserEx
*
iface
,
LPWSTR
szBuffer
,
DWORD
cchBuffer
,
DWORD
*
pchBuffer
)
{
FIXME
(
"%p %p %u %p
\n
"
,
iface
,
szBuffer
,
cchBuffer
,
pchBuffer
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
MetaDataDispenser_FindAssembly
(
IMetaDataDispenserEx
*
iface
,
LPCWSTR
szAppBase
,
LPCWSTR
szPrivateBin
,
LPCWSTR
szGlobalBin
,
LPCWSTR
szAssemblyName
,
LPWSTR
szName
,
ULONG
cchName
,
ULONG
*
pcName
)
{
FIXME
(
"%p %s %s %s %s %p %u %p
\n
"
,
iface
,
debugstr_w
(
szAppBase
),
debugstr_w
(
szPrivateBin
),
debugstr_w
(
szGlobalBin
),
debugstr_w
(
szAssemblyName
),
szName
,
cchName
,
pcName
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
MetaDataDispenser_FindAssemblyModule
(
IMetaDataDispenserEx
*
iface
,
LPCWSTR
szAppBase
,
LPCWSTR
szPrivateBin
,
LPCWSTR
szGlobalBin
,
LPCWSTR
szAssemblyName
,
LPCWSTR
szModuleName
,
LPWSTR
szName
,
ULONG
cchName
,
ULONG
*
pcName
)
{
FIXME
(
"%p %s %s %s %s %s %p %u %p
\n
"
,
iface
,
debugstr_w
(
szAppBase
),
debugstr_w
(
szPrivateBin
),
debugstr_w
(
szGlobalBin
),
debugstr_w
(
szAssemblyName
),
debugstr_w
(
szModuleName
),
szName
,
cchName
,
pcName
);
return
E_NOTIMPL
;
}
const
struct
IMetaDataDispenserExVtbl
MetaDataDispenserVtbl
=
{
MetaDataDispenser_QueryInterface
,
MetaDataDispenser_AddRef
,
MetaDataDispenser_Release
,
MetaDataDispenser_DefineScope
,
MetaDataDispenser_OpenScope
,
MetaDataDispenser_OpenScopeOnMemory
,
MetaDataDispenser_SetOption
,
MetaDataDispenser_GetOption
,
MetaDataDispenser_OpenScopeOnITypeInfo
,
MetaDataDispenser_GetCORSystemDirectory
,
MetaDataDispenser_FindAssembly
,
MetaDataDispenser_FindAssemblyModule
};
HRESULT
MetaDataDispenser_CreateInstance
(
IUnknown
**
ppUnk
)
{
MetaDataDispenser
*
This
;
This
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
MetaDataDispenser
));
if
(
!
This
)
return
E_OUTOFMEMORY
;
This
->
lpVtbl
=
&
MetaDataDispenserVtbl
;
This
->
ref
=
1
;
*
ppUnk
=
(
IUnknown
*
)
This
;
return
S_OK
;
}
dlls/mscoree/mscoree_private.h
View file @
9e20c21d
...
...
@@ -54,6 +54,8 @@ extern HRESULT force_get_runtime_info(ICLRRuntimeInfo **result);
extern
HRESULT
ICLRRuntimeInfo_GetRuntimeHost
(
ICLRRuntimeInfo
*
iface
,
RuntimeHost
**
result
);
extern
HRESULT
MetaDataDispenser_CreateInstance
(
IUnknown
**
ppUnk
);
typedef
struct
parsed_config_file
{
struct
list
supported_runtimes
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment