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
de8674ec
Commit
de8674ec
authored
Jun 30, 2004
by
Mike McCormack
Committed by
Alexandre Julliard
Jun 30, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set the storage file's GUID so native MSI recognizes it.
Fix crash when inserting multiple columns that are invalid.
parent
16abc780
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
0 deletions
+32
-0
msi.c
dlls/msi/msi.c
+25
-0
record.c
dlls/msi/record.c
+3
-0
string.c
dlls/msi/string.c
+4
-0
No files found.
dlls/msi/msi.c
View file @
de8674ec
...
...
@@ -36,6 +36,8 @@
#include "wine/unicode.h"
#include "objbase.h"
#include "initguid.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
msi
);
/*
...
...
@@ -46,6 +48,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(msi);
*/
#define LPCTSTR LPCWSTR
DEFINE_GUID
(
CLSID_MsiDatabase
,
0x000c1084
,
0x0000
,
0x0000
,
0xc0
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x46
);
static
const
WCHAR
szInstaller
[]
=
{
'S'
,
'o'
,
'f'
,
't'
,
'w'
,
'a'
,
'r'
,
'e'
,
'\\'
,
'M'
,
'i'
,
'c'
,
'r'
,
'o'
,
's'
,
'o'
,
'f'
,
't'
,
'\\'
,
...
...
@@ -188,6 +192,7 @@ UINT WINAPI MsiOpenDatabaseW(LPCWSTR szDBPath, LPCWSTR szPersist, MSIHANDLE *phD
MSIDATABASE
*
db
;
UINT
ret
;
LPWSTR
szMode
;
STATSTG
stat
;
TRACE
(
"%s %s %p
\n
"
,
debugstr_w
(
szDBPath
),
debugstr_w
(
szPersist
),
phDB
);
...
...
@@ -212,7 +217,10 @@ UINT WINAPI MsiOpenDatabaseW(LPCWSTR szDBPath, LPCWSTR szPersist, MSIHANDLE *phD
r
=
StgCreateDocfile
(
szDBPath
,
STGM_DIRECT
|
STGM_READWRITE
|
STGM_SHARE_EXCLUSIVE
,
0
,
&
stg
);
if
(
r
==
ERROR_SUCCESS
)
{
IStorage_SetClass
(
stg
,
&
CLSID_MsiDatabase
);
r
=
init_string_table
(
stg
);
}
}
else
if
(
szPersist
==
MSIDBOPEN_TRANSACT
)
{
...
...
@@ -231,6 +239,23 @@ UINT WINAPI MsiOpenDatabaseW(LPCWSTR szDBPath, LPCWSTR szPersist, MSIHANDLE *phD
return
ERROR_FUNCTION_FAILED
;
}
r
=
IStorage_Stat
(
stg
,
&
stat
,
STATFLAG_NONAME
);
if
(
FAILED
(
r
)
)
{
FIXME
(
"Failed to stat storage
\n
"
);
ret
=
ERROR_FUNCTION_FAILED
;
goto
end
;
}
if
(
memcmp
(
&
stat
.
clsid
,
&
CLSID_MsiDatabase
,
sizeof
(
GUID
)
)
)
{
ERR
(
"storage GUID is not a MSI database GUID %s
\n
"
,
debugstr_guid
(
&
stat
.
clsid
)
);
ret
=
ERROR_FUNCTION_FAILED
;
goto
end
;
}
handle
=
alloc_msihandle
(
MSIHANDLETYPE_DATABASE
,
sizeof
(
MSIDATABASE
),
MSI_CloseDatabase
,
(
void
**
)
&
db
);
if
(
!
handle
)
...
...
dlls/msi/record.c
View file @
de8674ec
...
...
@@ -284,6 +284,9 @@ const WCHAR *MSI_RecordGetString( MSIHANDLE handle, unsigned int iField )
if
(
iField
>
rec
->
count
)
return
NULL
;
if
(
rec
->
fields
[
iField
].
type
!=
MSIFIELD_WSTR
)
return
NULL
;
return
rec
->
fields
[
iField
].
u
.
szwVal
;
}
...
...
dlls/msi/string.c
View file @
de8674ec
...
...
@@ -143,6 +143,8 @@ int msi_addstring( string_table *st, int n, const CHAR *data, int len, UINT refc
{
int
sz
;
if
(
!
data
)
return
0
;
if
(
!
data
[
0
]
)
return
0
;
if
(
n
>
0
)
...
...
@@ -189,6 +191,8 @@ int msi_addstringW( string_table *st, int n, const WCHAR *data, int len, UINT re
{
/* TRACE("[%2d] = %s\n", string_no, debugstr_an(data,len) ); */
if
(
!
data
)
return
0
;
if
(
!
data
[
0
]
)
return
0
;
if
(
n
>
0
)
...
...
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