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
b040e4bc
Commit
b040e4bc
authored
Mar 18, 2004
by
Mike McCormack
Committed by
Alexandre Julliard
Mar 18, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
When loading table data, split it up into rows.
parent
8d02010f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
81 additions
and
9 deletions
+81
-9
msi.c
dlls/msi/msi.c
+2
-2
msipriv.h
dlls/msi/msipriv.h
+7
-1
msiquery.c
dlls/msi/msiquery.c
+16
-3
string.c
dlls/msi/string.c
+56
-3
table.c
dlls/msi/table.c
+0
-0
No files found.
dlls/msi/msi.c
View file @
b040e4bc
...
@@ -500,13 +500,13 @@ UINT WINAPI MsiEnableLogW(DWORD dwLogMode, LPCWSTR szLogFile, BOOL fAppend)
...
@@ -500,13 +500,13 @@ UINT WINAPI MsiEnableLogW(DWORD dwLogMode, LPCWSTR szLogFile, BOOL fAppend)
INSTALLSTATE
WINAPI
MsiQueryProductStateA
(
LPCSTR
szProduct
)
INSTALLSTATE
WINAPI
MsiQueryProductStateA
(
LPCSTR
szProduct
)
{
{
FIXME
(
"%s
\n
"
,
debugstr_a
(
szProduct
));
FIXME
(
"%s
\n
"
,
debugstr_a
(
szProduct
));
return
0
;
return
INSTALLSTATE_UNKNOWN
;
}
}
INSTALLSTATE
WINAPI
MsiQueryProductStateW
(
LPCWSTR
szProduct
)
INSTALLSTATE
WINAPI
MsiQueryProductStateW
(
LPCWSTR
szProduct
)
{
{
FIXME
(
"%s
\n
"
,
debugstr_w
(
szProduct
));
FIXME
(
"%s
\n
"
,
debugstr_w
(
szProduct
));
return
0
;
return
INSTALLSTATE_UNKNOWN
;
}
}
INSTALLUILEVEL
WINAPI
MsiSetInternalUI
(
INSTALLUILEVEL
dwUILevel
,
HWND
*
phWnd
)
INSTALLUILEVEL
WINAPI
MsiSetInternalUI
(
INSTALLUILEVEL
dwUILevel
,
HWND
*
phWnd
)
...
...
dlls/msi/msipriv.h
View file @
b040e4bc
...
@@ -153,14 +153,20 @@ extern void free_cached_tables( MSIDATABASE *db );
...
@@ -153,14 +153,20 @@ extern void free_cached_tables( MSIDATABASE *db );
extern
UINT
find_cached_table
(
MSIDATABASE
*
db
,
LPCWSTR
name
,
MSITABLE
**
table
);
extern
UINT
find_cached_table
(
MSIDATABASE
*
db
,
LPCWSTR
name
,
MSITABLE
**
table
);
extern
UINT
get_table
(
MSIDATABASE
*
db
,
LPCWSTR
name
,
MSITABLE
**
table
);
extern
UINT
get_table
(
MSIDATABASE
*
db
,
LPCWSTR
name
,
MSITABLE
**
table
);
extern
UINT
load_string_table
(
MSIDATABASE
*
db
);
extern
UINT
load_string_table
(
MSIDATABASE
*
db
);
extern
UINT
MSI_CommitTables
(
MSIDATABASE
*
db
);
/* string table functions */
/* string table functions */
extern
BOOL
msi_addstring
(
string_table
*
st
,
UINT
string_no
,
CHAR
*
data
,
UINT
len
,
UINT
refcount
);
extern
BOOL
msi_addstring
(
string_table
*
st
,
UINT
string_no
,
CHAR
*
data
,
UINT
len
,
UINT
refcount
);
extern
UINT
msi_id2string
(
string_table
*
st
,
UINT
string_no
,
LPWSTR
buffer
,
UINT
*
sz
);
extern
UINT
msi_id2stringW
(
string_table
*
st
,
UINT
string_no
,
LPWSTR
buffer
,
UINT
*
sz
);
extern
UINT
msi_id2stringA
(
string_table
*
st
,
UINT
string_no
,
LPSTR
buffer
,
UINT
*
sz
);
extern
LPWSTR
MSI_makestring
(
MSIDATABASE
*
db
,
UINT
stringid
);
extern
LPWSTR
MSI_makestring
(
MSIDATABASE
*
db
,
UINT
stringid
);
extern
UINT
msi_string2id
(
string_table
*
st
,
LPCWSTR
buffer
,
UINT
*
id
);
extern
UINT
msi_string2id
(
string_table
*
st
,
LPCWSTR
buffer
,
UINT
*
id
);
extern
string_table
*
msi_init_stringtable
(
int
entries
);
extern
string_table
*
msi_init_stringtable
(
int
entries
);
extern
VOID
msi_destroy_stringtable
(
string_table
*
st
);
extern
VOID
msi_destroy_stringtable
(
string_table
*
st
);
extern
UINT
msi_string_count
(
string_table
*
st
);
extern
UINT
msi_id_refcount
(
string_table
*
st
,
UINT
i
);
extern
UINT
msi_string_totalsize
(
string_table
*
st
);
UINT
VIEW_find_column
(
MSIVIEW
*
view
,
LPWSTR
name
,
UINT
*
n
);
UINT
VIEW_find_column
(
MSIVIEW
*
view
,
LPWSTR
name
,
UINT
*
n
);
...
...
dlls/msi/msiquery.c
View file @
b040e4bc
...
@@ -361,8 +361,22 @@ UINT WINAPI MsiDatabaseGenerateTransformW( MSIHANDLE hdb, MSIHANDLE hdbref,
...
@@ -361,8 +361,22 @@ UINT WINAPI MsiDatabaseGenerateTransformW( MSIHANDLE hdb, MSIHANDLE hdbref,
UINT
WINAPI
MsiDatabaseCommit
(
MSIHANDLE
hdb
)
UINT
WINAPI
MsiDatabaseCommit
(
MSIHANDLE
hdb
)
{
{
FIXME
(
"%ld
\n
"
,
hdb
);
MSIDATABASE
*
db
;
return
ERROR_SUCCESS
;
UINT
r
;
TRACE
(
"%ld
\n
"
,
hdb
);
db
=
msihandle2msiinfo
(
hdb
,
MSIHANDLETYPE_DATABASE
);
if
(
!
db
)
return
ERROR_INVALID_HANDLE
;
/* FIXME: lock the database */
r
=
MSI_CommitTables
(
db
);
/* FIXME: unlock the database */
return
r
;
}
}
UINT
WINAPI
MsiDatabaseGetPrimaryKeysA
(
MSIHANDLE
hdb
,
UINT
WINAPI
MsiDatabaseGetPrimaryKeysA
(
MSIHANDLE
hdb
,
...
@@ -406,4 +420,3 @@ UINT WINAPI MsiGetComponentStateW(MSIHANDLE hInstall, LPWSTR szFeature,
...
@@ -406,4 +420,3 @@ UINT WINAPI MsiGetComponentStateW(MSIHANDLE hInstall, LPWSTR szFeature,
FIXME
(
"%ld %s %p %p
\n
"
,
hInstall
,
debugstr_w
(
szFeature
),
piInstalled
,
piAction
);
FIXME
(
"%ld %s %p %p
\n
"
,
hInstall
,
debugstr_w
(
szFeature
),
piInstalled
,
piAction
);
return
ERROR_CALL_NOT_IMPLEMENTED
;
return
ERROR_CALL_NOT_IMPLEMENTED
;
}
}
dlls/msi/string.c
View file @
b040e4bc
...
@@ -123,7 +123,7 @@ int msi_addstring( string_table *st, UINT string_no, CHAR *data, UINT len, UINT
...
@@ -123,7 +123,7 @@ int msi_addstring( string_table *st, UINT string_no, CHAR *data, UINT len, UINT
{
{
int
n
;
int
n
;
TRACE
(
"[%2d] = %s
\n
"
,
string_no
,
debugstr_an
(
data
,
len
)
);
/* TRACE("[%2d] = %s\n", string_no, debugstr_an(data,len) ); */
n
=
st_find_free_entry
(
st
);
n
=
st_find_free_entry
(
st
);
if
(
n
<
0
)
if
(
n
<
0
)
...
@@ -145,7 +145,35 @@ int msi_addstring( string_table *st, UINT string_no, CHAR *data, UINT len, UINT
...
@@ -145,7 +145,35 @@ int msi_addstring( string_table *st, UINT string_no, CHAR *data, UINT len, UINT
return
n
;
return
n
;
}
}
UINT
msi_id2string
(
string_table
*
st
,
UINT
string_no
,
LPWSTR
buffer
,
UINT
*
sz
)
UINT
msi_id2stringW
(
string_table
*
st
,
UINT
string_no
,
LPWSTR
buffer
,
UINT
*
sz
)
{
UINT
len
;
LPSTR
str
;
TRACE
(
"Finding string %d of %d
\n
"
,
string_no
,
st
->
count
);
if
(
string_no
>=
st
->
count
)
return
ERROR_FUNCTION_FAILED
;
if
(
!
st
->
strings
[
string_no
].
refcount
)
return
ERROR_FUNCTION_FAILED
;
str
=
st
->
strings
[
string_no
].
str
;
len
=
strlen
(
str
);
if
(
!
buffer
)
{
*
sz
=
MultiByteToWideChar
(
CP_ACP
,
0
,
str
,
len
,
NULL
,
0
);
return
ERROR_SUCCESS
;
}
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
str
,
len
+
1
,
buffer
,
*
sz
);
if
(
!
len
)
buffer
[
*
sz
-
1
]
=
0
;
else
*
sz
=
len
;
return
ERROR_SUCCESS
;
}
UINT
msi_id2stringA
(
string_table
*
st
,
UINT
string_no
,
LPSTR
buffer
,
UINT
*
sz
)
{
{
UINT
len
;
UINT
len
;
LPSTR
str
;
LPSTR
str
;
...
@@ -166,7 +194,8 @@ UINT msi_id2string( string_table *st, UINT string_no, LPWSTR buffer, UINT *sz )
...
@@ -166,7 +194,8 @@ UINT msi_id2string( string_table *st, UINT string_no, LPWSTR buffer, UINT *sz )
return
ERROR_SUCCESS
;
return
ERROR_SUCCESS
;
}
}
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
str
,
len
,
buffer
,
*
sz
-
1
);
if
(
len
>=
*
sz
)
len
=
*
sz
-
1
;
memcpy
(
buffer
,
str
,
len
);
buffer
[
len
]
=
0
;
buffer
[
len
]
=
0
;
*
sz
=
len
+
1
;
*
sz
=
len
+
1
;
...
@@ -207,3 +236,27 @@ UINT msi_string2id( string_table *st, LPCWSTR buffer, UINT *id )
...
@@ -207,3 +236,27 @@ UINT msi_string2id( string_table *st, LPCWSTR buffer, UINT *id )
return
r
;
return
r
;
}
}
UINT
msi_string_count
(
string_table
*
st
)
{
return
st
->
count
;
}
UINT
msi_id_refcount
(
string_table
*
st
,
UINT
i
)
{
if
(
i
>=
st
->
count
)
return
0
;
return
st
->
strings
[
i
].
refcount
;
}
UINT
msi_string_totalsize
(
string_table
*
st
)
{
UINT
size
=
0
,
i
;
for
(
i
=
0
;
i
<
st
->
count
;
i
++
)
{
if
(
st
->
strings
[
i
].
str
)
size
+=
strlen
(
st
->
strings
[
i
].
str
);
}
return
size
;
}
dlls/msi/table.c
View file @
b040e4bc
This diff is collapsed.
Click to expand it.
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