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
f434ab1f
Commit
f434ab1f
authored
Dec 02, 2009
by
Vincent Povirk
Committed by
Alexandre Julliard
Dec 04, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Unify the logic for overriding the root storage filename in Stat.
This is needed so that the new transacted type will be able to easily support this logic.
parent
5456724f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
37 deletions
+14
-37
stg_stream.c
dlls/ole32/stg_stream.c
+1
-3
storage32.c
dlls/ole32/storage32.c
+9
-30
storage32.h
dlls/ole32/storage32.h
+4
-4
No files found.
dlls/ole32/stg_stream.c
View file @
f434ab1f
...
...
@@ -858,9 +858,7 @@ static HRESULT WINAPI StgStreamImpl_Stat(
if
(
readSuccessful
)
{
StorageImpl
*
root
=
This
->
parentStorage
->
ancestorStorage
;
StorageUtl_CopyDirEntryToSTATSTG
(
root
,
StorageUtl_CopyDirEntryToSTATSTG
(
This
->
parentStorage
,
pstatstg
,
&
currentEntry
,
grfStatFlag
);
...
...
dlls/ole32/storage32.c
View file @
f434ab1f
...
...
@@ -704,7 +704,7 @@ static HRESULT WINAPI StorageBaseImpl_Stat(
if
(
readSuccessful
)
{
StorageUtl_CopyDirEntryToSTATSTG
(
This
->
ancestorStorage
,
This
,
pstatstg
,
&
currentEntry
,
grfStatFlag
);
...
...
@@ -1841,30 +1841,6 @@ static HRESULT WINAPI StorageBaseImpl_DestroyElement(
}
/************************************************************************
* StorageImpl_Stat (IStorage)
*
* This method will retrieve information about this storage object.
*
* See Windows documentation for more details on IStorage methods.
*/
static
HRESULT
WINAPI
StorageImpl_Stat
(
IStorage
*
iface
,
STATSTG
*
pstatstg
,
/* [out] */
DWORD
grfStatFlag
)
/* [in] */
{
StorageImpl
*
const
This
=
(
StorageImpl
*
)
iface
;
HRESULT
result
=
StorageBaseImpl_Stat
(
iface
,
pstatstg
,
grfStatFlag
);
if
(
SUCCEEDED
(
result
)
&&
((
grfStatFlag
&
STATFLAG_NONAME
)
==
0
)
&&
This
->
pwcsName
)
{
CoTaskMemFree
(
pstatstg
->
pwcsName
);
pstatstg
->
pwcsName
=
CoTaskMemAlloc
((
lstrlenW
(
This
->
pwcsName
)
+
1
)
*
sizeof
(
WCHAR
));
strcpyW
(
pstatstg
->
pwcsName
,
This
->
pwcsName
);
}
return
result
;
}
/******************************************************************************
* Internal stream list handlers
*/
...
...
@@ -2240,7 +2216,7 @@ static const IStorageVtbl Storage32Impl_Vtbl =
StorageBaseImpl_SetElementTimes
,
StorageBaseImpl_SetClass
,
StorageBaseImpl_SetStateBits
,
StorageImpl_Stat
Storage
Base
Impl_Stat
};
static
HRESULT
StorageImpl_Construct
(
...
...
@@ -2295,6 +2271,9 @@ static HRESULT StorageImpl_Construct(
goto
end
;
}
strcpyW
(
This
->
pwcsName
,
pwcsName
);
memcpy
(
This
->
base
.
filename
,
pwcsName
,
DIRENTRY_NAME_BUFFER_LEN
-
1
);
This
->
base
.
filename
[
DIRENTRY_NAME_BUFFER_LEN
-
1
]
=
0
;
}
/*
...
...
@@ -3786,7 +3765,7 @@ static HRESULT WINAPI IEnumSTATSTGImpl_Next(
/*
* Copy the information to the return buffer.
*/
StorageUtl_CopyDirEntryToSTATSTG
(
This
->
parentStorag
e
,
StorageUtl_CopyDirEntryToSTATSTG
(
&
This
->
parentStorage
->
bas
e
,
currentReturnStruct
,
&
currentEntry
,
STATFLAG_DEFAULT
);
...
...
@@ -4218,7 +4197,7 @@ void StorageUtl_WriteGUID(BYTE* buffer, ULONG offset, const GUID* value)
}
void
StorageUtl_CopyDirEntryToSTATSTG
(
Storage
Impl
*
storage
,
Storage
BaseImpl
*
storage
,
STATSTG
*
destination
,
const
DirEntry
*
source
,
int
statFlags
)
...
...
@@ -5998,8 +5977,8 @@ HRESULT WINAPI StgOpenStorage(
/* prepare the file name string given in lieu of the root property name */
GetFullPathNameW
(
pwcsName
,
MAX_PATH
,
fullname
,
NULL
);
memcpy
(
newStorage
->
filename
,
fullname
,
DIRENTRY_NAME_BUFFER_LEN
);
newStorage
->
filename
[
DIRENTRY_NAME_BUFFER_LEN
-
1
]
=
'\0'
;
memcpy
(
newStorage
->
base
.
filename
,
fullname
,
DIRENTRY_NAME_BUFFER_LEN
);
newStorage
->
base
.
filename
[
DIRENTRY_NAME_BUFFER_LEN
-
1
]
=
'\0'
;
/*
* Get an "out" pointer for the caller.
...
...
dlls/ole32/storage32.h
View file @
f434ab1f
...
...
@@ -236,6 +236,9 @@ struct StorageBaseImpl
*/
DWORD
stateBits
;
/* If set, this overrides the root storage name returned by IStorage_Stat */
WCHAR
filename
[
DIRENTRY_NAME_BUFFER_LEN
];
BOOL
create
;
/* Was the storage created or opened.
The behaviour of STGM_SIMPLE depends on this */
};
...
...
@@ -264,9 +267,6 @@ struct StorageImpl
HANDLE
hFile
;
/* Physical support for the Docfile */
LPOLESTR
pwcsName
;
/* Full path of the document file */
/* FIXME: should this be in Storage32BaseImpl ? */
WCHAR
filename
[
DIRENTRY_NAME_BUFFER_LEN
];
/*
* File header
*/
...
...
@@ -429,7 +429,7 @@ void StorageUtl_WriteULargeInteger(BYTE* buffer, ULONG offset,
const
ULARGE_INTEGER
*
value
);
void
StorageUtl_ReadGUID
(
const
BYTE
*
buffer
,
ULONG
offset
,
GUID
*
value
);
void
StorageUtl_WriteGUID
(
BYTE
*
buffer
,
ULONG
offset
,
const
GUID
*
value
);
void
StorageUtl_CopyDirEntryToSTATSTG
(
StorageImpl
*
storage
,
STATSTG
*
destination
,
void
StorageUtl_CopyDirEntryToSTATSTG
(
Storage
Base
Impl
*
storage
,
STATSTG
*
destination
,
const
DirEntry
*
source
,
int
statFlags
);
/****************************************************************************
...
...
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