Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
86787db2
Commit
86787db2
authored
Dec 13, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 13, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
atl: Merge registrar.c into atl_main.c.
parent
526fe933
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
115 additions
and
149 deletions
+115
-149
Makefile.in
dlls/atl/Makefile.in
+1
-3
atl_main.c
dlls/atl/atl_main.c
+114
-1
registrar.c
dlls/atl/registrar.c
+0
-145
No files found.
dlls/atl/Makefile.in
View file @
86787db2
...
...
@@ -3,9 +3,7 @@ IMPORTLIB = atl
IMPORTS
=
uuid atl100 oleaut32 ole32 user32
EXTRADEFS
=
-D_ATL_VER
=
_ATL_VER_30
C_SRCS
=
\
atl_main.c
\
registrar.c
C_SRCS
=
atl_main.c
IDL_R_SRCS
=
atl_classes.idl
...
...
dlls/atl/atl_main.c
View file @
86787db2
...
...
@@ -2,6 +2,7 @@
* Implementation of Active Template Library (atl.dll)
*
* Copyright 2004 Aric Stewart for CodeWeavers
* Copyright 2005 Jacek Caban
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
...
...
@@ -23,6 +24,7 @@
#define COBJMACROS
#include "objidl.h"
#include "rpcproxy.h"
#include "atlbase.h"
#include "atlwin.h"
...
...
@@ -31,7 +33,7 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
atl
);
DECLSPEC_HIDDEN
HINSTANCE
hInst
;
static
HINSTANCE
hInst
;
BOOL
WINAPI
DllMain
(
HINSTANCE
hinstDLL
,
DWORD
fdwReason
,
LPVOID
lpvReserved
)
{
...
...
@@ -462,6 +464,117 @@ void* WINAPI AtlModuleExtractCreateWndData(_ATL_MODULEW *pM)
}
/***********************************************************************
* AtlModuleUpdateRegistryFromResourceD [ATL.@]
*
*/
HRESULT
WINAPI
AtlModuleUpdateRegistryFromResourceD
(
_ATL_MODULEW
*
pM
,
LPCOLESTR
lpszRes
,
BOOL
bRegister
,
struct
_ATL_REGMAP_ENTRY
*
pMapEntries
,
IRegistrar
*
pReg
)
{
TRACE
(
"(%p %s %d %p %p)
\n
"
,
pM
,
debugstr_w
(
lpszRes
),
bRegister
,
pMapEntries
,
pReg
);
return
AtlUpdateRegistryFromResourceD
(
pM
->
m_hInst
,
lpszRes
,
bRegister
,
pMapEntries
,
pReg
);
}
static
HRESULT
WINAPI
RegistrarCF_QueryInterface
(
IClassFactory
*
iface
,
REFIID
riid
,
void
**
ppvObject
)
{
TRACE
(
"(%p)->(%s %p)
\n
"
,
iface
,
debugstr_guid
(
riid
),
ppvObject
);
if
(
IsEqualGUID
(
&
IID_IUnknown
,
riid
)
||
IsEqualGUID
(
&
IID_IClassFactory
,
riid
))
{
*
ppvObject
=
iface
;
IClassFactory_AddRef
(
iface
);
return
S_OK
;
}
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
RegistrarCF_AddRef
(
IClassFactory
*
iface
)
{
return
2
;
}
static
ULONG
WINAPI
RegistrarCF_Release
(
IClassFactory
*
iface
)
{
return
1
;
}
static
HRESULT
WINAPI
RegistrarCF_CreateInstance
(
IClassFactory
*
iface
,
LPUNKNOWN
pUnkOuter
,
REFIID
riid
,
void
**
ppv
)
{
IRegistrar
*
registrar
;
HRESULT
hres
;
TRACE
(
"(%p)->(%s %p)
\n
"
,
iface
,
debugstr_guid
(
riid
),
ppv
);
if
(
pUnkOuter
)
{
*
ppv
=
NULL
;
return
CLASS_E_NOAGGREGATION
;
}
hres
=
AtlCreateRegistrar
(
&
registrar
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
IRegistrar_QueryInterface
(
registrar
,
riid
,
ppv
);
IRegistrar_Release
(
registrar
);
return
hres
;
}
static
HRESULT
WINAPI
RegistrarCF_LockServer
(
IClassFactory
*
iface
,
BOOL
lock
)
{
TRACE
(
"(%p)->(%x)
\n
"
,
iface
,
lock
);
return
S_OK
;
}
static
const
IClassFactoryVtbl
IRegistrarCFVtbl
=
{
RegistrarCF_QueryInterface
,
RegistrarCF_AddRef
,
RegistrarCF_Release
,
RegistrarCF_CreateInstance
,
RegistrarCF_LockServer
};
static
IClassFactory
RegistrarCF
=
{
&
IRegistrarCFVtbl
};
/**************************************************************
* DllGetClassObject (ATL.2)
*/
HRESULT
WINAPI
DllGetClassObject
(
REFCLSID
clsid
,
REFIID
riid
,
LPVOID
*
ppvObject
)
{
TRACE
(
"(%s %s %p)
\n
"
,
debugstr_guid
(
clsid
),
debugstr_guid
(
riid
),
ppvObject
);
if
(
IsEqualGUID
(
&
CLSID_Registrar
,
clsid
))
return
IClassFactory_QueryInterface
(
&
RegistrarCF
,
riid
,
ppvObject
);
FIXME
(
"Not supported class %s
\n
"
,
debugstr_guid
(
clsid
));
return
CLASS_E_CLASSNOTAVAILABLE
;
}
/***********************************************************************
* DllRegisterServer (ATL.@)
*/
HRESULT
WINAPI
DllRegisterServer
(
void
)
{
return
__wine_register_resources
(
hInst
);
}
/***********************************************************************
* DllUnRegisterServer (ATL.@)
*/
HRESULT
WINAPI
DllUnregisterServer
(
void
)
{
return
__wine_unregister_resources
(
hInst
);
}
/***********************************************************************
* DllCanUnloadNow (ATL.@)
*/
HRESULT
WINAPI
DllCanUnloadNow
(
void
)
{
return
S_FALSE
;
}
/***********************************************************************
* AtlGetVersion [ATL.@]
*/
DWORD
WINAPI
AtlGetVersion
(
void
*
pReserved
)
...
...
dlls/atl/registrar.c
deleted
100644 → 0
View file @
526fe933
/*
* Copyright 2005 Jacek Caban
*
* 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
*/
#define COBJMACROS
#include "oaidl.h"
#include "rpcproxy.h"
#include "atlbase.h"
#include "wine/debug.h"
#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
atl
);
/**************************************************************
* ClassFactory implementation
*/
static
HRESULT
WINAPI
RegistrarCF_QueryInterface
(
IClassFactory
*
iface
,
REFIID
riid
,
void
**
ppvObject
)
{
TRACE
(
"(%p)->(%s %p)
\n
"
,
iface
,
debugstr_guid
(
riid
),
ppvObject
);
if
(
IsEqualGUID
(
&
IID_IUnknown
,
riid
)
||
IsEqualGUID
(
&
IID_IClassFactory
,
riid
))
{
*
ppvObject
=
iface
;
IClassFactory_AddRef
(
iface
);
return
S_OK
;
}
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
RegistrarCF_AddRef
(
IClassFactory
*
iface
)
{
return
2
;
}
static
ULONG
WINAPI
RegistrarCF_Release
(
IClassFactory
*
iface
)
{
return
1
;
}
static
HRESULT
WINAPI
RegistrarCF_CreateInstance
(
IClassFactory
*
iface
,
LPUNKNOWN
pUnkOuter
,
REFIID
riid
,
void
**
ppv
)
{
IRegistrar
*
registrar
;
HRESULT
hres
;
TRACE
(
"(%p)->(%s %p)
\n
"
,
iface
,
debugstr_guid
(
riid
),
ppv
);
if
(
pUnkOuter
)
{
*
ppv
=
NULL
;
return
CLASS_E_NOAGGREGATION
;
}
hres
=
AtlCreateRegistrar
(
&
registrar
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
IRegistrar_QueryInterface
(
registrar
,
riid
,
ppv
);
IRegistrar_Release
(
registrar
);
return
hres
;
}
static
HRESULT
WINAPI
RegistrarCF_LockServer
(
IClassFactory
*
iface
,
BOOL
lock
)
{
TRACE
(
"(%p)->(%x)
\n
"
,
iface
,
lock
);
return
S_OK
;
}
static
const
IClassFactoryVtbl
IRegistrarCFVtbl
=
{
RegistrarCF_QueryInterface
,
RegistrarCF_AddRef
,
RegistrarCF_Release
,
RegistrarCF_CreateInstance
,
RegistrarCF_LockServer
};
static
IClassFactory
RegistrarCF
=
{
&
IRegistrarCFVtbl
};
/**************************************************************
* DllGetClassObject (ATL.2)
*/
HRESULT
WINAPI
DllGetClassObject
(
REFCLSID
clsid
,
REFIID
riid
,
LPVOID
*
ppvObject
)
{
TRACE
(
"(%s %s %p)
\n
"
,
debugstr_guid
(
clsid
),
debugstr_guid
(
riid
),
ppvObject
);
if
(
IsEqualGUID
(
&
CLSID_Registrar
,
clsid
))
return
IClassFactory_QueryInterface
(
&
RegistrarCF
,
riid
,
ppvObject
);
FIXME
(
"Not supported class %s
\n
"
,
debugstr_guid
(
clsid
));
return
CLASS_E_CLASSNOTAVAILABLE
;
}
extern
HINSTANCE
hInst
;
/***********************************************************************
* AtlModuleUpdateRegistryFromResourceD [ATL.@]
*
*/
HRESULT
WINAPI
AtlModuleUpdateRegistryFromResourceD
(
_ATL_MODULEW
*
pM
,
LPCOLESTR
lpszRes
,
BOOL
bRegister
,
struct
_ATL_REGMAP_ENTRY
*
pMapEntries
,
IRegistrar
*
pReg
)
{
TRACE
(
"(%p %s %d %p %p)
\n
"
,
pM
,
debugstr_w
(
lpszRes
),
bRegister
,
pMapEntries
,
pReg
);
return
AtlUpdateRegistryFromResourceD
(
pM
->
m_hInst
,
lpszRes
,
bRegister
,
pMapEntries
,
pReg
);
}
/***********************************************************************
* DllRegisterServer (ATL.@)
*/
HRESULT
WINAPI
DllRegisterServer
(
void
)
{
return
__wine_register_resources
(
hInst
);
}
/***********************************************************************
* DllUnRegisterServer (ATL.@)
*/
HRESULT
WINAPI
DllUnregisterServer
(
void
)
{
return
__wine_unregister_resources
(
hInst
);
}
/***********************************************************************
* DllCanUnloadNow (ATL.@)
*/
HRESULT
WINAPI
DllCanUnloadNow
(
void
)
{
return
S_FALSE
;
}
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