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
f56d029f
Commit
f56d029f
authored
Jan 30, 1999
by
Francis Beaudet
Committed by
Alexandre Julliard
Jan 30, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented the startup-shutdown mechanism for the COM subsystem.
Implemented the Class object registration mechanism.
parent
18f1975a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
82 additions
and
9 deletions
+82
-9
compobj.spec
if1632/compobj.spec
+1
-1
objbase.h
include/objbase.h
+6
-3
winerror.h
include/winerror.h
+1
-0
compobj.c
ole/compobj.c
+0
-0
ole2.c
ole/ole2.c
+72
-3
ole32.spec
relay32/ole32.spec
+2
-2
No files found.
if1632/compobj.spec
View file @
f56d029f
...
...
@@ -3,7 +3,7 @@ type win16
1 pascal CoBuildVersion() CoBuildVersion
2 pascal CoInitialize(long) CoInitialize16
3 pascal CoUninitialize() CoUninitialize
3 pascal CoUninitialize() CoUninitialize
16
4 pascal CoGetMalloc(long ptr) CoGetMalloc16
5 pascal CoRegisterClassObject(ptr ptr long long ptr) CoRegisterClassObject16
6 stub COREVOKECLASSOBJECT
...
...
include/objbase.h
View file @
f56d029f
...
...
@@ -41,8 +41,9 @@ HRESULT WINAPI CoInitialize32(LPVOID lpReserved);
HRESULT
WINAPI
CoInitializeEx32
(
LPVOID
lpReserved
,
DWORD
dwCoInit
);
#define CoInitializeEx WINELIB_NAME(CoInitializeEx)
void
WINAPI
CoUninitialize
(
void
);
void
WINAPI
CoUninitialize16
(
void
);
void
WINAPI
CoUninitialize32
(
void
);
#define CoUninitialize WINELIB_NAME(CoUninitialize)
HRESULT
WINAPI
CoCreateGuid
(
GUID
*
pguid
);
...
...
@@ -59,7 +60,9 @@ HRESULT WINAPI CoRegisterClassObject16(REFCLSID rclsid, LPUNKNOWN pUnk, DWORD dw
HRESULT
WINAPI
CoRegisterClassObject32
(
REFCLSID
rclsid
,
LPUNKNOWN
pUnk
,
DWORD
dwClsContext
,
DWORD
flags
,
LPDWORD
lpdwRegister
);
#define CoRegisterClassObject WINELIB_NAME(CoRegisterClassObject)
HRESULT
WINAPI
CoRevokeClassObject
(
DWORD
dwRegister
);
HRESULT
WINAPI
CoRevokeClassObject32
(
DWORD
dwRegister
);
#define CoRevokeClassObject WINELIB_NAME(CoRevokeClassObject)
HRESULT
WINAPI
CoGetClassObject
(
REFCLSID
rclsid
,
DWORD
dwClsContext
,
LPVOID
pvReserved
,
const
REFIID
iid
,
LPVOID
*
ppv
);
...
...
include/winerror.h
View file @
f56d029f
...
...
@@ -184,6 +184,7 @@ extern int WIN32_LastError;
#define CO_E_INIT_SCM_EXEC_FAILURE 0x80004011
#define CO_E_INIT_ONLY_SINGLE_THREADED 0x80004012 */
#define CO_E_OBJISREG 0x800401FB
#define OLE_E_ENUM_NOMORE 0x80040002
#define CLASS_E_NOAGGREGATION 0x80040110
#define CLASS_E_CLASSNOTAVAILABLE 0x80040111
...
...
ole/compobj.c
View file @
f56d029f
This diff is collapsed.
Click to expand it.
ole/ole2.c
View file @
f56d029f
...
...
@@ -9,6 +9,7 @@
#include "ole2.h"
#include "process.h"
#include "debug.h"
#include "objbase.h"
#include "objidl.h"
#include "wine/obj_base.h"
#include "wine/obj_clientserver.h"
...
...
@@ -16,6 +17,17 @@
#include "wine/obj_moniker.h"
/******************************************************************************
* These are static/global variables that the OLE module uses to maintain
* it's state.
*/
/*
* This is the lock count on the OLE library. It is controlled by the
* OLEInitialize/OLEUninitialize methods.
*/
static
ULONG
s_OLEModuleLockCount
=
0
;
/******************************************************************************
* OleBuildVersion [OLE2.1]
*/
DWORD
WINAPI
OleBuildVersion
(
void
)
...
...
@@ -29,8 +41,44 @@ DWORD WINAPI OleBuildVersion(void)
*/
HRESULT
WINAPI
OleInitialize
(
LPVOID
reserved
)
{
FIXME
(
ole
,
"OleInitialize - stub
\n
"
);
return
S_OK
;
HRESULT
hr
;
TRACE
(
ole
,
"(%p)
\n
"
,
reserved
);
/*
* The first duty of the OleInitialize is to initialize the COM libraries.
*/
hr
=
CoInitializeEx32
(
NULL
,
COINIT_APARTMENTTHREADED
);
/*
* If the CoInitializeEx call failed, the OLE libraries can't be
* initialized.
*/
if
(
FAILED
(
hr
))
return
hr
;
/*
* Then, it has to initialize the OLE specific modules.
* This includes:
* Clipboard
* Drag and Drop
* Object linking and Embedding
* In-place activation
*/
if
(
s_OLEModuleLockCount
==
0
)
{
/*
* Initialize the libraries.
*/
TRACE
(
ole
,
"() - Initializing the OLE libraries
\n
"
);
}
/*
* Then, we increase the lock count on the OLE module.
*/
s_OLEModuleLockCount
++
;
return
hr
;
}
/******************************************************************************
...
...
@@ -48,7 +96,28 @@ DWORD WINAPI CoGetCurrentProcess(void) {
*/
void
WINAPI
OleUninitialize
(
void
)
{
FIXME
(
ole
,
"stub
\n
"
);
TRACE
(
ole
,
"()
\n
"
);
/*
* Decrease the lock count on the OLE module.
*/
s_OLEModuleLockCount
--
;
/*
* If we hit the bottom of the lock stack, free the libraries.
*/
if
(
s_OLEModuleLockCount
==
0
)
{
/*
* Actually free the libraries.
*/
TRACE
(
ole
,
"() - Freeing the last reference count
\n
"
);
}
/*
* Then, uninitialize the COM libraries.
*/
CoUninitialize32
();
}
/***********************************************************************
...
...
relay32/ole32.spec
View file @
f56d029f
...
...
@@ -40,14 +40,14 @@ type win32
37 stub CoRegisterMallocSpy
38 stdcall CoRegisterMessageFilter(ptr ptr) CoRegisterMessageFilter32
39 stub CoReleaseMarshalData
40 stdcall CoRevokeClassObject(long) CoRevokeClassObject
40 stdcall CoRevokeClassObject(long) CoRevokeClassObject
32
41 stub CoRevokeMallocSpy
42 stdcall CoSetState(ptr) CoSetState32
43 stdcall CoTaskMemAlloc(long) CoTaskMemAlloc
44 stdcall CoTaskMemFree(ptr) CoTaskMemFree
45 stub CoTaskMemRealloc
46 stub CoTreatAsClass
47 stdcall CoUninitialize() CoUninitialize
47 stdcall CoUninitialize() CoUninitialize
32
48 stub CoUnloadingWOW
49 stub CoUnmarshalHresult
50 stub CoUnmarshalInterface
...
...
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