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
0e189144
Commit
0e189144
authored
Jan 14, 2005
by
Robert Shearman
Committed by
Alexandre Julliard
Jan 14, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Add documentation for most Co* functions.
- Move several functions into different files to group them with similar functions.
parent
2d58a624
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
101 additions
and
42 deletions
+101
-42
compobj.c
dlls/ole32/compobj.c
+0
-0
ifs.c
dlls/ole32/ifs.c
+62
-7
ole2.c
dlls/ole32/ole2.c
+39
-26
ole2stubs.c
dlls/ole32/ole2stubs.c
+0
-9
No files found.
dlls/ole32/compobj.c
View file @
0e189144
This diff is collapsed.
Click to expand it.
dlls/ole32/ifs.c
View file @
0e189144
...
...
@@ -527,8 +527,15 @@ static IMallocSpyVtbl VT_IMallocSpy =
/******************************************************************************
* CoGetMalloc [OLE32.@]
*
* Retrieves the current IMalloc interface for the process.
*
* PARAMS
* dwMemContext [I]
* lpMalloc [O] Address where memory allocator object will be stored.
*
* RETURNS
* The win32 IMalloc
* Success: S_OK.
* Failure: HRESULT code.
*/
HRESULT
WINAPI
CoGetMalloc
(
DWORD
dwMemContext
,
LPMALLOC
*
lpMalloc
)
{
...
...
@@ -538,15 +545,31 @@ HRESULT WINAPI CoGetMalloc(DWORD dwMemContext, LPMALLOC *lpMalloc)
/***********************************************************************
* CoTaskMemAlloc [OLE32.@]
*
* Allocates memory using the current process memory allocator.
*
* PARAMS
* size [I] Size of the memory block to allocate.
*
* RETURNS
* pointer to newly allocated block
* Success: Pointer to newly allocated memory block.
* Failure: NULL.
*/
LPVOID
WINAPI
CoTaskMemAlloc
(
ULONG
size
)
{
return
IMalloc_Alloc
((
LPMALLOC
)
&
Malloc32
,
size
);
}
/***********************************************************************
* CoTaskMemFree [OLE32.@]
*
* Frees memory allocated from the current process memory allocator.
*
* PARAMS
* ptr [I] Memory block to free.
*
* RETURNS
* Nothing.
*/
VOID
WINAPI
CoTaskMemFree
(
LPVOID
ptr
)
{
...
...
@@ -555,8 +578,16 @@ VOID WINAPI CoTaskMemFree(LPVOID ptr)
/***********************************************************************
* CoTaskMemRealloc [OLE32.@]
*
* Allocates memory using the current process memory allocator.
*
* PARAMS
* pvOld [I] Pointer to old memory block.
* size [I] Size of the new memory block.
*
* RETURNS
* pointer to newly allocated block
* Success: Pointer to newly allocated memory block.
* Failure: NULL.
*/
LPVOID
WINAPI
CoTaskMemRealloc
(
LPVOID
pvOld
,
ULONG
size
)
{
...
...
@@ -566,6 +597,16 @@ LPVOID WINAPI CoTaskMemRealloc(LPVOID pvOld, ULONG size)
/***********************************************************************
* CoRegisterMallocSpy [OLE32.@]
*
* Registers an object that receives notifications on memory allocations and
* frees.
*
* PARAMS
* pMallocSpy [I] New spy object.
*
* RETURNS
* Success: S_OK.
* Failure: HRESULT code.
*
* NOTES
* if a mallocspy is already registered, we can't do it again since
* only the spy knows, how to free a memory block
...
...
@@ -597,6 +638,16 @@ HRESULT WINAPI CoRegisterMallocSpy(LPMALLOCSPY pMallocSpy)
/***********************************************************************
* CoRevokeMallocSpy [OLE32.@]
*
* Revokes a previousl registered object that receives notifications on memory
* allocations and frees.
*
* PARAMS
* pMallocSpy [I] New spy object.
*
* RETURNS
* Success: S_OK.
* Failure: HRESULT code.
*
* NOTES
* we can't revoke a malloc spy as long as memory blocks allocated with
* the spy are active since only the spy knows how to free them
...
...
@@ -629,12 +680,16 @@ HRESULT WINAPI CoRevokeMallocSpy(void)
/******************************************************************************
* IsValidInterface [OLE32.@]
*
* Determines whether a pointer is a valid interface.
*
* PARAMS
* punk [I] Interface to be tested.
*
* RETURNS
* T
rue, if the passed pointer is a valid interface
* T
RUE, if the passed pointer is a valid interface, or FALSE otherwise.
*/
BOOL
WINAPI
IsValidInterface
(
LPUNKNOWN
punk
/* [in] interface to be tested */
)
{
BOOL
WINAPI
IsValidInterface
(
LPUNKNOWN
punk
)
{
return
!
(
IsBadReadPtr
(
punk
,
4
)
||
IsBadReadPtr
(
punk
->
lpVtbl
,
4
)
||
...
...
dlls/ole32/ole2.c
View file @
0e189144
...
...
@@ -48,6 +48,7 @@
#include "wine/wingdi16.h"
#include "wine/winuser16.h"
#include "ole32_main.h"
#include "compobj_private.h"
#include "wine/debug.h"
...
...
@@ -244,18 +245,6 @@ HRESULT WINAPI OleInitialize(LPVOID reserved)
}
/******************************************************************************
* CoGetCurrentProcess [COMPOBJ.34]
* CoGetCurrentProcess [OLE32.@]
*
* NOTES
* Is DWORD really the correct return type for this function?
*/
DWORD
WINAPI
CoGetCurrentProcess
(
void
)
{
return
GetCurrentProcessId
();
}
/******************************************************************************
* OleUninitialize [OLE2.3]
* OleUninitialize [OLE32.@]
*/
...
...
@@ -301,20 +290,6 @@ void WINAPI OleUninitialize(void)
}
/******************************************************************************
* CoRegisterMessageFilter [OLE32.@]
*/
HRESULT
WINAPI
CoRegisterMessageFilter
(
LPMESSAGEFILTER
lpMessageFilter
,
/* [in] Pointer to interface */
LPMESSAGEFILTER
*
lplpMessageFilter
/* [out] Indirect pointer to prior instance if non-NULL */
)
{
FIXME
(
"stub
\n
"
);
if
(
lplpMessageFilter
)
{
*
lplpMessageFilter
=
NULL
;
}
return
S_OK
;
}
/******************************************************************************
* OleInitializeWOW [OLE32.@]
*/
HRESULT
WINAPI
OleInitializeWOW
(
DWORD
x
)
{
...
...
@@ -2313,6 +2288,44 @@ HRESULT WINAPI OleCreate(
return
hres
;
}
/******************************************************************************
* OleSetAutoConvert [OLE32.@]
*/
/* FIXME: convert to Unicode */
HRESULT
WINAPI
OleSetAutoConvert
(
REFCLSID
clsidOld
,
REFCLSID
clsidNew
)
{
HKEY
hkey
=
0
;
char
buf
[
200
],
szClsidNew
[
200
];
HRESULT
res
=
S_OK
;
TRACE
(
"(%s,%s)
\n
"
,
debugstr_guid
(
clsidOld
),
debugstr_guid
(
clsidNew
));
sprintf
(
buf
,
"CLSID
\\
"
);
WINE_StringFromCLSID
(
clsidOld
,
&
buf
[
6
]);
WINE_StringFromCLSID
(
clsidNew
,
szClsidNew
);
if
(
RegOpenKeyA
(
HKEY_CLASSES_ROOT
,
buf
,
&
hkey
))
{
res
=
REGDB_E_CLASSNOTREG
;
goto
done
;
}
if
(
RegSetValueA
(
hkey
,
"AutoConvertTo"
,
REG_SZ
,
szClsidNew
,
strlen
(
szClsidNew
)
+
1
))
{
res
=
REGDB_E_WRITEREGDB
;
goto
done
;
}
done:
if
(
hkey
)
RegCloseKey
(
hkey
);
return
res
;
}
/******************************************************************************
* OleDoAutoConvert [OLE32.@]
*/
HRESULT
WINAPI
OleDoAutoConvert
(
IStorage
*
pStg
,
LPCLSID
pClsidNew
)
{
FIXME
(
"(%p,%p) : stub
\n
"
,
pStg
,
pClsidNew
);
return
E_NOTIMPL
;
}
/***********************************************************************
* OLE_FreeClipDataArray [internal]
*
...
...
dlls/ole32/ole2stubs.c
View file @
0e189144
...
...
@@ -139,15 +139,6 @@ HRESULT WINAPI OleRegEnumFormatEtc (
}
/***********************************************************************
* CoIsOle1Class [OLE32.@]
*/
BOOL
WINAPI
CoIsOle1Class
(
REFCLSID
clsid
)
{
FIXME
(
"%s
\n
"
,
debugstr_guid
(
clsid
));
return
FALSE
;
}
/***********************************************************************
* DllGetClassObject [OLE2.4]
*/
HRESULT
WINAPI
DllGetClassObject16
(
REFCLSID
rclsid
,
REFIID
iid
,
LPVOID
*
ppv
)
...
...
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