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
959c7184
Commit
959c7184
authored
Nov 13, 2006
by
Mike McCormack
Committed by
Alexandre Julliard
Nov 13, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Fix error handling.
parent
3ef703ad
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
20 deletions
+21
-20
custom.c
dlls/msi/custom.c
+21
-20
No files found.
dlls/msi/custom.c
View file @
959c7184
...
...
@@ -291,13 +291,13 @@ static UINT store_binary_to_temp(MSIPACKAGE *package, LPCWSTR source,
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'`'
,
'B'
,
'i'
,
'n'
,
'a'
,
'r'
,
'y'
,
'`'
,
' '
,
'W'
,
'H'
,
'E'
,
'R'
,
'E'
,
' '
,
'`'
,
'N'
,
'a'
,
'm'
,
'e'
,
'`'
,
' '
,
'='
,
' '
,
'\''
,
'%'
,
's'
,
'\''
,
0
};
UINT
rc
;
MSIRECORD
*
row
=
0
;
HANDLE
file
;
CHAR
buffer
[
1024
];
static
const
WCHAR
f1
[]
=
{
'm'
,
's'
,
'i'
,
0
};
WCHAR
fmt
[
MAX_PATH
];
DWORD
sz
=
MAX_PATH
;
UINT
r
;
if
(
MSI_GetPropertyW
(
package
,
cszTempFolder
,
fmt
,
&
sz
)
!=
ERROR_SUCCESS
)
GetTempPathW
(
MAX_PATH
,
fmt
);
...
...
@@ -309,34 +309,35 @@ static UINT store_binary_to_temp(MSIPACKAGE *package, LPCWSTR source,
}
track_tempfile
(
package
,
tmp_file
,
tmp_file
);
/* write out the file */
file
=
CreateFileW
(
tmp_file
,
GENERIC_WRITE
,
0
,
NULL
,
CREATE_ALWAYS
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
if
(
file
==
INVALID_HANDLE_VALUE
)
return
ERROR_FUNCTION_FAILED
;
row
=
MSI_QueryGetRecord
(
package
->
db
,
query
,
source
);
if
(
!
row
)
return
ERROR_FUNCTION_FAILED
;
do
/* write out the file */
file
=
CreateFileW
(
tmp_file
,
GENERIC_WRITE
,
0
,
NULL
,
CREATE_ALWAYS
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
if
(
file
==
INVALID_HANDLE_VALUE
)
r
=
ERROR_FUNCTION_FAILED
;
else
{
DWORD
write
;
sz
=
sizeof
buffer
;
rc
=
MSI_RecordReadStream
(
row
,
2
,
buffer
,
&
sz
);
if
(
rc
!=
ERROR_SUCCESS
)
do
{
ERR
(
"Failed to get stream
\n
"
);
CloseHandle
(
file
);
break
;
}
WriteFile
(
file
,
buffer
,
sz
,
&
write
,
NULL
);
}
while
(
sz
==
sizeof
buffer
);
DWORD
write
;
sz
=
sizeof
buffer
;
r
=
MSI_RecordReadStream
(
row
,
2
,
buffer
,
&
sz
);
if
(
r
!=
ERROR_SUCCESS
)
{
ERR
(
"Failed to get stream
\n
"
);
break
;
}
WriteFile
(
file
,
buffer
,
sz
,
&
write
,
NULL
);
}
while
(
sz
==
sizeof
buffer
);
CloseHandle
(
file
);
}
CloseHandle
(
file
);
msiobj_release
(
&
row
->
hdr
);
return
ERROR_SUCCESS
;
return
r
;
}
static
void
file_running_action
(
MSIPACKAGE
*
package
,
HANDLE
Handle
,
...
...
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