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
f42d61df
Commit
f42d61df
authored
Aug 16, 2006
by
Robert Shearman
Committed by
Alexandre Julliard
Aug 16, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Move some functions out of compobj.c that don't belong there and update…
ole32: Move some functions out of compobj.c that don't belong there and update the copyright statement.
parent
0e99d795
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
85 additions
and
86 deletions
+85
-86
compobj.c
dlls/ole32/compobj.c
+1
-86
ole2.c
dlls/ole32/ole2.c
+27
-0
storage32.c
dlls/ole32/storage32.c
+57
-0
No files found.
dlls/ole32/compobj.c
View file @
f42d61df
...
...
@@ -7,6 +7,7 @@
* Copyright 1999 Sylvain St-Germain
* Copyright 2002 Marcus Meissner
* Copyright 2004 Mike Hearn
* Copyright 2005-2006 Robert Shearman (for CodeWeavers)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
...
...
@@ -1321,65 +1322,6 @@ HRESULT WINAPI CoRegisterPSClsid(REFIID riid, REFCLSID rclsid)
}
/***********************************************************************
* WriteClassStm (OLE32.@)
*
* Writes a CLSID to a stream.
*
* PARAMS
* pStm [I] Stream to write to.
* rclsid [I] CLSID to write.
*
* RETURNS
* Success: S_OK.
* Failure: HRESULT code.
*/
HRESULT
WINAPI
WriteClassStm
(
IStream
*
pStm
,
REFCLSID
rclsid
)
{
TRACE
(
"(%p,%p)
\n
"
,
pStm
,
rclsid
);
if
(
rclsid
==
NULL
)
return
E_INVALIDARG
;
return
IStream_Write
(
pStm
,
rclsid
,
sizeof
(
CLSID
),
NULL
);
}
/***********************************************************************
* ReadClassStm (OLE32.@)
*
* Reads a CLSID from a stream.
*
* PARAMS
* pStm [I] Stream to read from.
* rclsid [O] CLSID to read.
*
* RETURNS
* Success: S_OK.
* Failure: HRESULT code.
*/
HRESULT
WINAPI
ReadClassStm
(
IStream
*
pStm
,
CLSID
*
pclsid
)
{
ULONG
nbByte
;
HRESULT
res
;
TRACE
(
"(%p,%p)
\n
"
,
pStm
,
pclsid
);
if
(
pclsid
==
NULL
)
return
E_INVALIDARG
;
res
=
IStream_Read
(
pStm
,(
void
*
)
pclsid
,
sizeof
(
CLSID
),
&
nbByte
);
if
(
FAILED
(
res
))
return
res
;
if
(
nbByte
!=
sizeof
(
CLSID
))
return
S_FALSE
;
else
return
S_OK
;
}
/***
* COM_GetRegisteredClassObject
*
...
...
@@ -2377,33 +2319,6 @@ HRESULT WINAPI CoSetState(IUnknown * pv)
/******************************************************************************
* OleGetAutoConvert [OLE32.@]
*/
HRESULT
WINAPI
OleGetAutoConvert
(
REFCLSID
clsidOld
,
LPCLSID
pClsidNew
)
{
static
const
WCHAR
wszAutoConvertTo
[]
=
{
'A'
,
'u'
,
't'
,
'o'
,
'C'
,
'o'
,
'n'
,
'v'
,
'e'
,
'r'
,
't'
,
'T'
,
'o'
,
0
};
HKEY
hkey
=
NULL
;
WCHAR
buf
[
CHARS_IN_GUID
];
LONG
len
;
HRESULT
res
=
S_OK
;
res
=
COM_OpenKeyForCLSID
(
clsidOld
,
wszAutoConvertTo
,
KEY_READ
,
&
hkey
);
if
(
FAILED
(
res
))
goto
done
;
len
=
sizeof
(
buf
);
if
(
RegQueryValueW
(
hkey
,
NULL
,
buf
,
&
len
))
{
res
=
REGDB_E_KEYMISSING
;
goto
done
;
}
res
=
CLSIDFromString
(
buf
,
pClsidNew
);
done:
if
(
hkey
)
RegCloseKey
(
hkey
);
return
res
;
}
/******************************************************************************
* CoTreatAsClass [OLE32.@]
*
* Sets the TreatAs value of a class.
...
...
dlls/ole32/ole2.c
View file @
f42d61df
...
...
@@ -2334,6 +2334,33 @@ HRESULT WINAPI OleCreate(
}
/******************************************************************************
* OleGetAutoConvert [OLE32.@]
*/
HRESULT
WINAPI
OleGetAutoConvert
(
REFCLSID
clsidOld
,
LPCLSID
pClsidNew
)
{
static
const
WCHAR
wszAutoConvertTo
[]
=
{
'A'
,
'u'
,
't'
,
'o'
,
'C'
,
'o'
,
'n'
,
'v'
,
'e'
,
'r'
,
't'
,
'T'
,
'o'
,
0
};
HKEY
hkey
=
NULL
;
WCHAR
buf
[
CHARS_IN_GUID
];
LONG
len
;
HRESULT
res
=
S_OK
;
res
=
COM_OpenKeyForCLSID
(
clsidOld
,
wszAutoConvertTo
,
KEY_READ
,
&
hkey
);
if
(
FAILED
(
res
))
goto
done
;
len
=
sizeof
(
buf
);
if
(
RegQueryValueW
(
hkey
,
NULL
,
buf
,
&
len
))
{
res
=
REGDB_E_KEYMISSING
;
goto
done
;
}
res
=
CLSIDFromString
(
buf
,
pClsidNew
);
done:
if
(
hkey
)
RegCloseKey
(
hkey
);
return
res
;
}
/******************************************************************************
* OleSetAutoConvert [OLE32.@]
*/
HRESULT
WINAPI
OleSetAutoConvert
(
REFCLSID
clsidOld
,
REFCLSID
clsidNew
)
...
...
dlls/ole32/storage32.c
View file @
f42d61df
...
...
@@ -7871,3 +7871,60 @@ StgIsStorageFile(LPCOLESTR fn)
WARN
(
" -> Invalid header.
\n
"
);
return
S_FALSE
;
}
/***********************************************************************
* WriteClassStm (OLE32.@)
*
* Writes a CLSID to a stream.
*
* PARAMS
* pStm [I] Stream to write to.
* rclsid [I] CLSID to write.
*
* RETURNS
* Success: S_OK.
* Failure: HRESULT code.
*/
HRESULT
WINAPI
WriteClassStm
(
IStream
*
pStm
,
REFCLSID
rclsid
)
{
TRACE
(
"(%p,%p)
\n
"
,
pStm
,
rclsid
);
if
(
rclsid
==
NULL
)
return
E_INVALIDARG
;
return
IStream_Write
(
pStm
,
rclsid
,
sizeof
(
CLSID
),
NULL
);
}
/***********************************************************************
* ReadClassStm (OLE32.@)
*
* Reads a CLSID from a stream.
*
* PARAMS
* pStm [I] Stream to read from.
* rclsid [O] CLSID to read.
*
* RETURNS
* Success: S_OK.
* Failure: HRESULT code.
*/
HRESULT
WINAPI
ReadClassStm
(
IStream
*
pStm
,
CLSID
*
pclsid
)
{
ULONG
nbByte
;
HRESULT
res
;
TRACE
(
"(%p,%p)
\n
"
,
pStm
,
pclsid
);
if
(
pclsid
==
NULL
)
return
E_INVALIDARG
;
res
=
IStream_Read
(
pStm
,(
void
*
)
pclsid
,
sizeof
(
CLSID
),
&
nbByte
);
if
(
FAILED
(
res
))
return
res
;
if
(
nbByte
!=
sizeof
(
CLSID
))
return
S_FALSE
;
else
return
S_OK
;
}
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