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
dc57873f
Commit
dc57873f
authored
Oct 16, 2007
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 17, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msimtf: Added class factory implementation.
parent
0101e58d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
78 additions
and
0 deletions
+78
-0
main.c
dlls/msimtf/main.c
+78
-0
No files found.
dlls/msimtf/main.c
View file @
dc57873f
...
...
@@ -21,6 +21,8 @@
#include <stdarg.h>
#include <stdio.h>
#define COBJMACROS
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
...
...
@@ -36,6 +38,12 @@ WINE_DEFAULT_DEBUG_CHANNEL(msimtf);
static
HINSTANCE
msimtf_instance
;
static
HRESULT
CActiveIMM_Create
(
IUnknown
*
outer
,
REFIID
riid
,
void
**
ppv
)
{
FIXME
(
"(%p %s %p)
\n
"
,
outer
,
debugstr_guid
(
riid
),
ppv
);
return
E_NOINTERFACE
;
}
/******************************************************************
* DllMain (msimtf.@)
*/
...
...
@@ -55,11 +63,81 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
return
TRUE
;
}
typedef
struct
{
const
IClassFactoryVtbl
*
lpClassFactoryVtbl
;
HRESULT
(
*
cf
)(
IUnknown
*
,
REFIID
,
void
**
);
}
ClassFactory
;
static
HRESULT
WINAPI
ClassFactory_QueryInterface
(
IClassFactory
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
*
ppv
=
NULL
;
if
(
IsEqualGUID
(
&
IID_IUnknown
,
riid
))
{
TRACE
(
"(IID_IUnknown %p)
\n
"
,
ppv
);
*
ppv
=
iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IClassFactory
,
riid
))
{
TRACE
(
"IID_IClassFactory %p)
\n
"
,
ppv
);
*
ppv
=
iface
;
}
if
(
*
ppv
)
{
IUnknown_AddRef
((
IUnknown
*
)
*
ppv
);
return
S_OK
;
}
FIXME
(
"(%s %p)
\n
"
,
debugstr_guid
(
riid
),
ppv
);
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
ClassFactory_AddRef
(
IClassFactory
*
iface
)
{
return
2
;
}
static
ULONG
WINAPI
ClassFactory_Release
(
IClassFactory
*
iface
)
{
return
1
;
}
static
HRESULT
WINAPI
ClassFactory_CreateInstance
(
IClassFactory
*
iface
,
IUnknown
*
pOuter
,
REFIID
riid
,
void
**
ppv
)
{
ClassFactory
*
This
=
(
ClassFactory
*
)
iface
;
return
This
->
cf
(
pOuter
,
riid
,
ppv
);
}
static
HRESULT
WINAPI
ClassFactory_LockServer
(
IClassFactory
*
iface
,
BOOL
dolock
)
{
FIXME
(
"(%d)
\n
"
,
dolock
);
return
S_OK
;
}
static
const
IClassFactoryVtbl
ClassFactoryVtbl
=
{
ClassFactory_QueryInterface
,
ClassFactory_AddRef
,
ClassFactory_Release
,
ClassFactory_CreateInstance
,
ClassFactory_LockServer
};
/******************************************************************
* DllGetClassObject (msimtf.@)
*/
HRESULT
WINAPI
DllGetClassObject
(
REFCLSID
rclsid
,
REFIID
riid
,
LPVOID
*
ppv
)
{
if
(
IsEqualGUID
(
&
CLSID_CActiveIMM
,
rclsid
))
{
static
ClassFactory
cf
=
{
&
ClassFactoryVtbl
,
CActiveIMM_Create
};
TRACE
(
"CLSID_CActiveIMM
\n
"
);
return
IClassFactory_QueryInterface
((
IClassFactory
*
)
&
cf
,
riid
,
ppv
);
}
FIXME
(
"(%s %s %p)
\n
"
,
debugstr_guid
(
rclsid
),
debugstr_guid
(
riid
),
ppv
);
return
CLASS_E_CLASSNOTAVAILABLE
;
}
...
...
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