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
25ec82c1
Commit
25ec82c1
authored
Mar 13, 1999
by
Thuy Nguyen
Committed by
Alexandre Julliard
Mar 13, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
StgCreateDocfile accepts NULL as a file name.
parent
8e5e588b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
1 deletion
+23
-1
storage32.c
ole/storage32.c
+23
-1
No files found.
ole/storage32.c
View file @
25ec82c1
...
...
@@ -22,6 +22,7 @@
#include "crtdll.h"
#include "tchar.h"
#include "debug.h"
#include "windef.h"
#include "storage32.h"
...
...
@@ -4953,11 +4954,12 @@ HRESULT WINAPI StgCreateDocfile(
DWORD
accessMode
;
DWORD
creationMode
;
DWORD
fileAttributes
;
WCHAR
tempFileName
[
MAX_PATH
];
/*
* Validate the parameters
*/
if
(
(
ppstgOpen
==
0
)
||
(
pwcsName
==
0
)
)
if
(
ppstgOpen
==
0
)
return
STG_E_INVALIDPOINTER
;
/*
...
...
@@ -4967,6 +4969,26 @@ HRESULT WINAPI StgCreateDocfile(
return
STG_E_INVALIDFLAG
;
/*
* Generate a unique name.
*/
if
(
pwcsName
==
0
)
{
WCHAR
tempPath
[
MAX_PATH
];
WCHAR
prefix
[]
=
{
'S'
,
'T'
,
'O'
,
0
};
memset
(
tempPath
,
0
,
sizeof
(
tempPath
));
memset
(
tempFileName
,
0
,
sizeof
(
tempFileName
));
if
((
GetTempPathW
(
MAX_PATH
,
tempPath
))
==
0
)
tempPath
[
0
]
=
'.'
;
if
(
GetTempFileNameW
(
tempPath
,
prefix
,
0
,
tempFileName
)
!=
0
)
pwcsName
=
tempFileName
;
else
return
STG_E_INSUFFICIENTMEMORY
;
}
/*
* Interpret the STGM value grfMode
*/
shareMode
=
GetShareModeFromSTGM
(
grfMode
);
...
...
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