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
c6f049fc
Commit
c6f049fc
authored
Nov 16, 2023
by
Fabian Maurer
Committed by
Alexandre Julliard
Dec 01, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
coml2: Move GetConvertStg from ole32.
parent
53c0a31b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
89 additions
and
32 deletions
+89
-32
Makefile.in
dlls/coml2/Makefile.in
+2
-1
coml2.spec
dlls/coml2/coml2.spec
+1
-1
storage32.c
dlls/coml2/storage32.c
+86
-0
storage32.c
dlls/ole32/storage32.c
+0
-30
No files found.
dlls/coml2/Makefile.in
View file @
c6f049fc
...
...
@@ -4,4 +4,5 @@ IMPORTLIB = coml2
IMPORTS
=
uuid
SOURCES
=
\
memlockbytes.c
memlockbytes.c
\
storage32.c
dlls/coml2/coml2.spec
View file @
c6f049fc
...
...
@@ -12,7 +12,7 @@
@ stdcall CreateILockBytesOnHGlobal(ptr long ptr)
@ stub DllGetClassObject
@ stub FmtIdToPropStgName
@ st
ub GetConvertStg
@ st
dcall GetConvertStg(ptr)
@ stdcall GetHGlobalFromILockBytes(ptr ptr)
@ stub PropStgNameToFmtId
@ stub ReadClassStg
...
...
dlls/coml2/storage32.c
0 → 100644
View file @
c6f049fc
/*
* Compound Storage (32 bit version)
* Storage implementation
*
* This file contains the compound file implementation
* of the storage interface.
*
* Copyright 1999 Francis Beaudet
* Copyright 1999 Sylvain St-Germain
* Copyright 1999 Thuy Nguyen
* Copyright 2005 Mike McCormack
*
* 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
*
* NOTES
* The compound file implementation of IStorage used for create
* and manage substorages and streams within a storage object
* residing in a compound file object.
*/
#include <assert.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define COBJMACROS
#include "windef.h"
#include "winbase.h"
#include "winnls.h"
#include "winuser.h"
#include "wine/debug.h"
#include "ole2.h"
/* For Write/ReadClassStm */
#include "winreg.h"
#include "wine/wingdi16.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
storage
);
enum
stream_1ole_flags
{
OleStream_LinkedObject
=
0x00000001
,
OleStream_Convert
=
0x00000004
};
/***********************************************************************
* GetConvertStg (coml2.@)
*/
HRESULT
WINAPI
GetConvertStg
(
IStorage
*
stg
)
{
static
const
DWORD
version_magic
=
0x02000001
;
DWORD
header
[
2
];
IStream
*
stream
;
HRESULT
hr
;
TRACE
(
"%p
\n
"
,
stg
);
if
(
!
stg
)
return
E_INVALIDARG
;
hr
=
IStorage_OpenStream
(
stg
,
L"
\1
Ole"
,
NULL
,
STGM_READ
|
STGM_SHARE_EXCLUSIVE
,
0
,
&
stream
);
if
(
FAILED
(
hr
))
return
hr
;
hr
=
IStream_Read
(
stream
,
header
,
sizeof
(
header
),
NULL
);
IStream_Release
(
stream
);
if
(
FAILED
(
hr
))
return
hr
;
if
(
header
[
0
]
!=
version_magic
)
{
ERR
(
"got wrong version magic for 1Ole stream, %#lx.
\n
"
,
header
[
0
]);
return
E_FAIL
;
}
return
header
[
1
]
&
OleStream_Convert
?
S_OK
:
S_FALSE
;
}
dlls/ole32/storage32.c
View file @
c6f049fc
...
...
@@ -10566,36 +10566,6 @@ HRESULT WINAPI OleConvertIStorageToOLESTREAMEx ( LPSTORAGE stg, CLIPFORMAT cf, L
}
/***********************************************************************
* GetConvertStg (OLE32.@)
*/
HRESULT
WINAPI
GetConvertStg
(
IStorage
*
stg
)
{
static
const
DWORD
version_magic
=
0x02000001
;
DWORD
header
[
2
];
IStream
*
stream
;
HRESULT
hr
;
TRACE
(
"%p
\n
"
,
stg
);
if
(
!
stg
)
return
E_INVALIDARG
;
hr
=
IStorage_OpenStream
(
stg
,
L"
\1
Ole"
,
NULL
,
STGM_READ
|
STGM_SHARE_EXCLUSIVE
,
0
,
&
stream
);
if
(
FAILED
(
hr
))
return
hr
;
hr
=
IStream_Read
(
stream
,
header
,
sizeof
(
header
),
NULL
);
IStream_Release
(
stream
);
if
(
FAILED
(
hr
))
return
hr
;
if
(
header
[
0
]
!=
version_magic
)
{
ERR
(
"got wrong version magic for 1Ole stream, %#lx.
\n
"
,
header
[
0
]);
return
E_FAIL
;
}
return
header
[
1
]
&
OleStream_Convert
?
S_OK
:
S_FALSE
;
}
/***********************************************************************
* SetConvertStg (OLE32.@)
*/
HRESULT
WINAPI
SetConvertStg
(
IStorage
*
storage
,
BOOL
convert
)
...
...
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