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
fcfab4e5
Commit
fcfab4e5
authored
Feb 18, 2022
by
Eric Pouech
Committed by
Alexandre Julliard
Feb 18, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
storage.dll16: Enable compilation with long types.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
12576050
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
30 deletions
+29
-30
Makefile.in
dlls/storage.dll16/Makefile.in
+0
-1
storage.c
dlls/storage.dll16/storage.c
+29
-29
No files found.
dlls/storage.dll16/Makefile.in
View file @
fcfab4e5
EXTRADEFS
=
-DWINE_NO_LONG_TYPES
MODULE
=
storage.dll16
IMPORTS
=
uuid ole32
EXTRADLLFLAGS
=
-m16
-Wb
,--main-module,ole32.dll
...
...
dlls/storage.dll16/storage.c
View file @
fcfab4e5
...
...
@@ -345,12 +345,12 @@ STORAGE_get_big_block(stream_access16 *str,int n,BYTE *block)
if
((
SetFilePointer
(
str
->
hf
,
(
n
+
1
)
*
BIGSIZE
,
NULL
,
SEEK_SET
)
==
INVALID_SET_FILE_POINTER
)
&&
GetLastError
())
{
WARN
(
"(%p,%d,%p), seek failed (%d)
\n
"
,
str
->
hf
,
n
,
block
,
GetLastError
());
WARN
(
"(%p,%d,%p), seek failed (%
l
d)
\n
"
,
str
->
hf
,
n
,
block
,
GetLastError
());
return
FALSE
;
}
if
(
!
ReadFile
(
str
->
hf
,
block
,
BIGSIZE
,
&
result
,
NULL
)
||
result
!=
BIGSIZE
)
{
WARN
(
"(hf=%p, block size %d): read didn't read (%d)
\n
"
,
str
->
hf
,
n
,
GetLastError
());
WARN
(
"(hf=%p, block size %d): read didn't read (%
l
d)
\n
"
,
str
->
hf
,
n
,
GetLastError
());
return
FALSE
;
}
}
else
{
...
...
@@ -374,7 +374,7 @@ STORAGE_get_big_block(stream_access16 *str,int n,BYTE *block)
(
LPVOID
)
args
,
(
LPDWORD
)
&
hres
))
{
ERR
(
"CallTo16 ILockBytes16::ReadAt() failed, hres %x
\n
"
,
hres
);
ERR
(
"CallTo16 ILockBytes16::ReadAt() failed, hres %
l
x
\n
"
,
hres
);
return
FALSE
;
}
memcpy
(
block
,
MapSL
(
args
[
3
]),
BIGSIZE
);
...
...
@@ -406,7 +406,7 @@ _ilockbytes16_writeat(SEGPTR lockbytes, DWORD offset, DWORD length, void *buffer
(
LPVOID
)
args
,
(
LPDWORD
)
&
hres
))
{
ERR
(
"CallTo16 ILockBytes16::WriteAt() failed, hres %x
\n
"
,
hres
);
ERR
(
"CallTo16 ILockBytes16::WriteAt() failed, hres %
l
x
\n
"
,
hres
);
return
FALSE
;
}
UnMapLS
(
args
[
3
]);
...
...
@@ -426,12 +426,12 @@ STORAGE_put_big_block(stream_access16 *str,int n,BYTE *block)
if
((
SetFilePointer
(
str
->
hf
,
(
n
+
1
)
*
BIGSIZE
,
NULL
,
SEEK_SET
)
==
INVALID_SET_FILE_POINTER
)
&&
GetLastError
())
{
WARN
(
"seek failed (%d)
\n
"
,
GetLastError
());
WARN
(
"seek failed (%
l
d)
\n
"
,
GetLastError
());
return
FALSE
;
}
if
(
!
WriteFile
(
str
->
hf
,
block
,
BIGSIZE
,
&
result
,
NULL
)
||
result
!=
BIGSIZE
)
{
WARN
(
" write failed (%d)
\n
"
,
GetLastError
());
WARN
(
" write failed (%
l
d)
\n
"
,
GetLastError
());
return
FALSE
;
}
return
TRUE
;
...
...
@@ -710,9 +710,9 @@ STORAGE_dump_pps_entry(struct storage_pps_entry *stde) {
return
;
TRACE
(
"name: %s
\n
"
,
name
);
TRACE
(
"type: %d
\n
"
,
stde
->
pps_type
);
TRACE
(
"prev pps: %d
\n
"
,
stde
->
pps_prev
);
TRACE
(
"next pps: %d
\n
"
,
stde
->
pps_next
);
TRACE
(
"dir pps: %d
\n
"
,
stde
->
pps_dir
);
TRACE
(
"prev pps: %
l
d
\n
"
,
stde
->
pps_prev
);
TRACE
(
"next pps: %
l
d
\n
"
,
stde
->
pps_next
);
TRACE
(
"dir pps: %
l
d
\n
"
,
stde
->
pps_dir
);
TRACE
(
"guid: %s
\n
"
,
debugstr_guid
(
&
(
stde
->
pps_guid
)));
if
(
stde
->
pps_type
!=
2
)
{
time_t
t
;
...
...
@@ -724,8 +724,8 @@ STORAGE_dump_pps_entry(struct storage_pps_entry *stde) {
t
=
dw
;
TRACE
(
"ts2: %s
\n
"
,
ctime
(
&
t
));
}
TRACE
(
"startblock: %d
\n
"
,
stde
->
pps_sb
);
TRACE
(
"size: %d
\n
"
,
stde
->
pps_size
);
TRACE
(
"startblock: %
l
d
\n
"
,
stde
->
pps_sb
);
TRACE
(
"size: %
l
d
\n
"
,
stde
->
pps_size
);
}
/******************************************************************************
...
...
@@ -1102,7 +1102,7 @@ _ilockbytes16_addref(SEGPTR lockbytes) {
(
LPVOID
)
args
,
(
LPDWORD
)
&
hres
))
ERR
(
"CallTo16 ILockBytes16::AddRef() failed, hres %x
\n
"
,
hres
);
ERR
(
"CallTo16 ILockBytes16::AddRef() failed, hres %
l
x
\n
"
,
hres
);
}
static
void
...
...
@@ -1120,7 +1120,7 @@ _ilockbytes16_release(SEGPTR lockbytes) {
(
LPVOID
)
args
,
(
LPDWORD
)
&
hres
))
ERR
(
"CallTo16 ILockBytes16::Release() failed, hres %x
\n
"
,
hres
);
ERR
(
"CallTo16 ILockBytes16::Release() failed, hres %
l
x
\n
"
,
hres
);
}
static
void
...
...
@@ -1138,7 +1138,7 @@ _ilockbytes16_flush(SEGPTR lockbytes) {
(
LPVOID
)
args
,
(
LPDWORD
)
&
hres
))
ERR
(
"CallTo16 ILockBytes16::Flush() failed, hres %x
\n
"
,
hres
);
ERR
(
"CallTo16 ILockBytes16::Flush() failed, hres %
l
x
\n
"
,
hres
);
}
/******************************************************************************
...
...
@@ -1176,7 +1176,7 @@ HRESULT CDECL IStream16_fnSeek(IStream16 *iface, LARGE_INTEGER offset, DWORD whe
ULARGE_INTEGER
*
newpos
)
{
IStream16Impl
*
This
=
impl_from_IStream16
(
iface
);
TRACE_
(
relay
)(
"(%p)->([%
d.%d],%
d,%p)
\n
"
,
This
,
offset
.
u
.
HighPart
,
offset
.
u
.
LowPart
,
whence
,
newpos
);
TRACE_
(
relay
)(
"(%p)->([%
ld.%ld],%l
d,%p)
\n
"
,
This
,
offset
.
u
.
HighPart
,
offset
.
u
.
LowPart
,
whence
,
newpos
);
switch
(
whence
)
{
case
STREAM_SEEK_SET
:
...
...
@@ -1213,7 +1213,7 @@ HRESULT CDECL IStream16_fnRead(IStream16 *iface, void *pv, ULONG cb, ULONG *pcbR
int
blocknr
;
LPBYTE
pbv
=
pv
;
TRACE_
(
relay
)(
"(%p)->(%p,%d,%p)
\n
"
,
This
,
pv
,
cb
,
pcbRead
);
TRACE_
(
relay
)(
"(%p)->(%p,%
l
d,%p)
\n
"
,
This
,
pv
,
cb
,
pcbRead
);
if
(
!
pcbRead
)
bytesread
=&
xxread
;
*
bytesread
=
0
;
...
...
@@ -1277,7 +1277,7 @@ HRESULT CDECL IStream16_fnWrite(IStream16 *iface, const void *pv, ULONG cb, ULON
if
(
!
pcbWrite
)
byteswritten
=&
xxwritten
;
*
byteswritten
=
0
;
TRACE_
(
relay
)(
"(%p)->(%p,%d,%p)
\n
"
,
This
,
pv
,
cb
,
pcbWrite
);
TRACE_
(
relay
)(
"(%p)->(%p,%
l
d,%p)
\n
"
,
This
,
pv
,
cb
,
pcbWrite
);
/* do we need to junk some blocks? */
newsize
=
This
->
offset
.
u
.
LowPart
+
cb
;
oldsize
=
This
->
stde
.
pps_size
;
...
...
@@ -1647,7 +1647,7 @@ HRESULT CDECL IStorage16_fnStat(IStorage16 *iface, STATSTG16 *pstatstg, DWORD gr
DWORD
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
This
->
stde
.
pps_rawname
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
LPSTR
nameA
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
TRACE
(
"(%p)->(%p,0x%08x)
\n
"
,
TRACE
(
"(%p)->(%p,0x%08
l
x)
\n
"
,
This
,
pstatstg
,
grfStatFlag
);
WideCharToMultiByte
(
CP_ACP
,
0
,
This
->
stde
.
pps_rawname
,
-
1
,
nameA
,
len
,
NULL
,
NULL
);
...
...
@@ -1671,7 +1671,7 @@ HRESULT CDECL IStorage16_fnStat(IStorage16 *iface, STATSTG16 *pstatstg, DWORD gr
HRESULT
CDECL
IStorage16_fnCommit
(
IStorage16
*
iface
,
DWORD
commitflags
)
{
IStorage16Impl
*
This
=
impl_from_IStorage16
(
iface
);
FIXME
(
"(%p)->(0x%08x),STUB!
\n
"
,
FIXME
(
"(%p)->(0x%08
l
x),STUB!
\n
"
,
This
,
commitflags
);
return
S_OK
;
...
...
@@ -1684,7 +1684,7 @@ HRESULT CDECL IStorage16_fnCopyTo(IStorage16 *iface, DWORD ciidExclude, const II
SNB16
SNB16Exclude
,
IStorage16
*
pstgDest
)
{
IStorage16Impl
*
This
=
impl_from_IStorage16
(
iface
);
FIXME
(
"IStorage16(%p)->(0x%08x,%s,%p,%p),stub!
\n
"
,
FIXME
(
"IStorage16(%p)->(0x%08
l
x,%s,%p,%p),stub!
\n
"
,
This
,
ciidExclude
,
debugstr_guid
(
rgiidExclude
),
SNB16Exclude
,
pstgDest
);
return
S_OK
;
...
...
@@ -1706,7 +1706,7 @@ HRESULT CDECL IStorage16_fnCreateStorage(IStorage16 *iface, LPCOLESTR16 pwcsName
int
nPPSEntries
;
READ_HEADER
(
&
This
->
str
);
TRACE
(
"(%p)->(%s,0x%08
x,0x%08x,0x%08
x,%p)
\n
"
,
TRACE
(
"(%p)->(%s,0x%08
lx,0x%08lx,0x%08l
x,%p)
\n
"
,
This
,
pwcsName
,
grfMode
,
dwStgFormat
,
reserved2
,
ppstg
);
if
(
grfMode
&
STGM_TRANSACTED
)
...
...
@@ -1773,7 +1773,7 @@ HRESULT CDECL IStorage16_fnCreateStream(IStorage16 *iface, LPCOLESTR16 pwcsName,
BOOL
ret
;
int
nPPSEntries
;
TRACE
(
"(%p)->(%s,0x%08
x,0x%08x,0x%08
x,%p)
\n
"
,
TRACE
(
"(%p)->(%s,0x%08
lx,0x%08lx,0x%08l
x,%p)
\n
"
,
This
,
pwcsName
,
grfMode
,
reserved1
,
reserved2
,
ppstm
);
if
(
grfMode
&
STGM_TRANSACTED
)
...
...
@@ -1835,7 +1835,7 @@ HRESULT CDECL IStorage16_fnOpenStorage(IStorage16 *iface, LPCOLESTR16 pwcsName,
WCHAR
name
[
33
];
int
newpps
;
TRACE
(
"(%p)->(%s,%p,0x%08
x,%p,0x%08
x,%p)
\n
"
,
TRACE
(
"(%p)->(%s,%p,0x%08
lx,%p,0x%08l
x,%p)
\n
"
,
This
,
pwcsName
,
pstgPrio
,
grfMode
,
snbExclude
,
reserved
,
ppstg
);
if
(
grfMode
&
STGM_TRANSACTED
)
...
...
@@ -1877,7 +1877,7 @@ HRESULT CDECL IStorage16_fnOpenStream(IStorage16 *iface, LPCOLESTR16 pwcsName, v
WCHAR
name
[
33
];
int
newpps
;
TRACE
(
"(%p)->(%s,%p,0x%08
x,0x%08
x,%p)
\n
"
,
TRACE
(
"(%p)->(%s,%p,0x%08
lx,0x%08l
x,%p)
\n
"
,
This
,
pwcsName
,
reserved1
,
grfMode
,
reserved2
,
ppstm
);
if
(
grfMode
&
STGM_TRANSACTED
)
...
...
@@ -1990,13 +1990,13 @@ HRESULT WINAPI StgCreateDocFile16(
IStorage16Impl
*
lpstg
;
struct
storage_pps_entry
stde
;
TRACE
(
"(%s,0x%08
x,0x%08
x,%p)
\n
"
,
TRACE
(
"(%s,0x%08
lx,0x%08l
x,%p)
\n
"
,
pwcsName
,
grfMode
,
reserved
,
ppstgOpen
);
_create_istorage16
(
ppstgOpen
);
hf
=
CreateFileA
(
pwcsName
,
GENERIC_READ
|
GENERIC_WRITE
,
0
,
NULL
,
CREATE_NEW
,
0
,
0
);
if
(
hf
==
INVALID_HANDLE_VALUE
)
{
WARN
(
"couldn't open file for storage:%d
\n
"
,
GetLastError
());
WARN
(
"couldn't open file for storage:%
l
d
\n
"
,
GetLastError
());
return
E_FAIL
;
}
lpstg
=
MapSL
((
SEGPTR
)
*
ppstgOpen
);
...
...
@@ -2051,7 +2051,7 @@ HRESULT WINAPI StgOpenStorage16(
IStorage16Impl
*
lpstg
;
struct
storage_pps_entry
stde
;
TRACE
(
"(%s,%p,0x%08
x,%p,%
d,%p)
\n
"
,
TRACE
(
"(%s,%p,0x%08
lx,%p,%l
d,%p)
\n
"
,
pwcsName
,
pstgPriority
,
grfMode
,
snbExclude
,
reserved
,
ppstgOpen
);
_create_istorage16
(
ppstgOpen
);
...
...
@@ -2106,7 +2106,7 @@ HRESULT WINAPI StgIsStorageILockBytes16(SEGPTR plkbyt)
(
LPVOID
)
args
,
(
LPDWORD
)
&
hres
))
{
ERR
(
"CallTo16 ILockBytes16::ReadAt() failed, hres %x
\n
"
,
hres
);
ERR
(
"CallTo16 ILockBytes16::ReadAt() failed, hres %
l
x
\n
"
,
hres
);
return
hres
;
}
if
(
memcmp
(
MapSL
(
args
[
3
]),
STORAGE_magic
,
sizeof
(
STORAGE_magic
))
==
0
)
{
...
...
@@ -2135,7 +2135,7 @@ HRESULT WINAPI StgOpenStorageOnILockBytes16(
int
i
,
ret
;
struct
storage_pps_entry
stde
;
FIXME
(
"(%
x, %p, 0x%08x, %d, %
x, %p)
\n
"
,
plkbyt
,
pstgPriority
,
grfMode
,
(
int
)
snbExclude
,
reserved
,
ppstgOpen
);
FIXME
(
"(%
lx, %p, 0x%08lx, %d, %l
x, %p)
\n
"
,
plkbyt
,
pstgPriority
,
grfMode
,
(
int
)
snbExclude
,
reserved
,
ppstgOpen
);
if
((
plkbyt
==
0
)
||
(
ppstgOpen
==
0
))
return
STG_E_INVALIDPOINTER
;
...
...
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