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
f3d99b26
Commit
f3d99b26
authored
May 16, 2005
by
Marcus Meissner
Committed by
Alexandre Julliard
May 16, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move the Dll init function to compobj.c to avoid having global
variables. Remove need of ole32_main.h.
parent
08cf5a30
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
40 additions
and
75 deletions
+40
-75
compobj.c
dlls/ole32/compobj.c
+37
-6
compobj_private.h
dlls/ole32/compobj_private.h
+2
-0
ole2.c
dlls/ole32/ole2.c
+0
-1
ole2_16.c
dlls/ole32/ole2_16.c
+0
-1
ole32_main.c
dlls/ole32/ole32_main.c
+1
-33
ole32_main.h
dlls/ole32/ole32_main.h
+0
-34
No files found.
dlls/ole32/compobj.c
View file @
f3d99b26
...
...
@@ -66,7 +66,6 @@
#include "wownt32.h"
#include "wine/unicode.h"
#include "objbase.h"
#include "ole32_main.h"
#include "compobj_private.h"
#include "wine/debug.h"
...
...
@@ -75,6 +74,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(ole);
typedef
LPCSTR
LPCOLESTR16
;
HINSTANCE
OLE32_hInstance
=
0
;
/* FIXME: make static ... */
/****************************************************************************
* This section defines variables internal to the COM module.
*
...
...
@@ -169,7 +170,7 @@ static LRESULT CALLBACK apartment_wndproc(HWND hWnd, UINT msg, WPARAM wParam, LP
static
void
COMPOBJ_DLLList_Add
(
HANDLE
hLibrary
);
static
void
COMPOBJ_DllList_FreeUnused
(
int
Timeout
);
void
COMPOBJ_InitProcess
(
void
)
static
void
COMPOBJ_InitProcess
(
void
)
{
WNDCLASSW
wclass
;
...
...
@@ -189,12 +190,12 @@ void COMPOBJ_InitProcess( void )
RegisterClassW
(
&
wclass
);
}
void
COMPOBJ_UninitProcess
(
void
)
static
void
COMPOBJ_UninitProcess
(
void
)
{
UnregisterClassW
(
wszAptWinClass
,
OLE32_hInstance
);
}
void
COM_TlsDestroy
()
static
void
COM_TlsDestroy
()
{
struct
oletls
*
info
=
NtCurrentTeb
()
->
ReservedForOle
;
if
(
info
)
...
...
@@ -624,7 +625,7 @@ HRESULT WINAPI CoInitializeEx(LPVOID lpReserved, DWORD dwCoInit)
/* On COM finalization for a STA thread, the message queue is flushed to ensure no
pending RPCs are ignored. Non-COM messages are discarded at this point.
*/
void
COM_FlushMessageQueue
(
void
)
static
void
COM_FlushMessageQueue
(
void
)
{
MSG
message
;
APARTMENT
*
apt
=
COM_CurrentApt
();
...
...
@@ -1531,7 +1532,8 @@ end:
*
* Reads a registry value and expands it when necessary
*/
HRESULT
compobj_RegReadPath
(
char
*
keyname
,
char
*
valuename
,
char
*
dst
,
DWORD
dstlen
)
static
HRESULT
compobj_RegReadPath
(
char
*
keyname
,
char
*
valuename
,
char
*
dst
,
DWORD
dstlen
)
{
HRESULT
hres
;
HKEY
key
;
...
...
@@ -2654,3 +2656,32 @@ HRESULT WINAPI CoWaitForMultipleHandles(DWORD dwFlags, DWORD dwTimeout,
TRACE
(
"-- 0x%08lx
\n
"
,
hr
);
return
hr
;
}
/***********************************************************************
* DllMain (OLE32.@)
*/
BOOL
WINAPI
DllMain
(
HINSTANCE
hinstDLL
,
DWORD
fdwReason
,
LPVOID
fImpLoad
)
{
TRACE
(
"%p 0x%lx %p
\n
"
,
hinstDLL
,
fdwReason
,
fImpLoad
);
switch
(
fdwReason
)
{
case
DLL_PROCESS_ATTACH
:
OLE32_hInstance
=
hinstDLL
;
COMPOBJ_InitProcess
();
if
(
TRACE_ON
(
ole
))
CoRegisterMallocSpy
((
LPVOID
)
-
1
);
break
;
case
DLL_PROCESS_DETACH
:
if
(
TRACE_ON
(
ole
))
CoRevokeMallocSpy
();
COMPOBJ_UninitProcess
();
OLE32_hInstance
=
0
;
break
;
case
DLL_THREAD_DETACH
:
COM_TlsDestroy
();
break
;
}
return
TRUE
;
}
/* NOTE: DllRegisterServer and DllUnregisterServer are in regsvr.c */
dlls/ole32/compobj_private.h
View file @
f3d99b26
...
...
@@ -254,4 +254,6 @@ static inline APARTMENT* COM_CurrentApt(void)
# define DEBUG_CLEAR_CRITSEC_NAME(cs)
#endif
extern
HINSTANCE
OLE32_hInstance
;
/* FIXME: make static */
#endif
/* __WINE_OLE_COMPOBJ_H */
dlls/ole32/ole2.c
View file @
f3d99b26
...
...
@@ -48,7 +48,6 @@
#include "wine/winbase16.h"
#include "wine/wingdi16.h"
#include "wine/winuser16.h"
#include "ole32_main.h"
#include "compobj_private.h"
#include "wine/debug.h"
...
...
dlls/ole32/ole2_16.c
View file @
f3d99b26
...
...
@@ -45,7 +45,6 @@
#include "wine/winbase16.h"
#include "wine/wingdi16.h"
#include "wine/winuser16.h"
#include "ole32_main.h"
#include "ifs.h"
#include "wine/debug.h"
...
...
dlls/ole32/ole32_main.c
View file @
f3d99b26
...
...
@@ -27,13 +27,11 @@
#include "wingdi.h"
#include "winuser.h"
#include "winnls.h"
#include "o
le32_main
.h"
#include "o
bjbase
.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
ole
);
HINSTANCE
OLE32_hInstance
=
0
;
/***********************************************************************
* OleMetafilePictFromIconAndLabel (OLE32.@)
*/
...
...
@@ -110,33 +108,3 @@ HGLOBAL WINAPI OleMetafilePictFromIconAndLabel(HICON hIcon, LPOLESTR lpszLabel,
return
hmem
;
}
/***********************************************************************
* DllMain (OLE32.@)
*/
BOOL
WINAPI
DllMain
(
HINSTANCE
hinstDLL
,
DWORD
fdwReason
,
LPVOID
fImpLoad
)
{
TRACE
(
"%p 0x%lx %p
\n
"
,
hinstDLL
,
fdwReason
,
fImpLoad
);
switch
(
fdwReason
)
{
case
DLL_PROCESS_ATTACH
:
OLE32_hInstance
=
hinstDLL
;
COMPOBJ_InitProcess
();
if
(
TRACE_ON
(
ole
))
CoRegisterMallocSpy
((
LPVOID
)
-
1
);
break
;
case
DLL_PROCESS_DETACH
:
if
(
TRACE_ON
(
ole
))
CoRevokeMallocSpy
();
COMPOBJ_UninitProcess
();
OLE32_hInstance
=
0
;
break
;
case
DLL_THREAD_DETACH
:
COM_TlsDestroy
();
break
;
}
return
TRUE
;
}
/* NOTE: DllRegisterServer and DllUnregisterServer are in regsvr.c */
dlls/ole32/ole32_main.h
deleted
100644 → 0
View file @
08cf5a30
/*
* Copyright 2000 Huw D M Davies 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __WINE_OLE32_MAIN_H
#define __WINE_OLE32_MAIN_H
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "objbase.h"
extern
HINSTANCE
OLE32_hInstance
;
void
COMPOBJ_InitProcess
(
void
);
void
COMPOBJ_UninitProcess
(
void
);
void
COM_TlsDestroy
(
void
);
#endif
/* __WINE_OLE32_MAIN_H */
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