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
8ebbc8c0
Commit
8ebbc8c0
authored
Aug 25, 2006
by
Mike McCormack
Committed by
Alexandre Julliard
Aug 25, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Reimplement msi_dup_property and msi_get_property_int.
parent
a4fb1c94
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
30 deletions
+23
-30
helpers.c
dlls/msi/helpers.c
+0
-29
package.c
dlls/msi/package.c
+23
-1
No files found.
dlls/msi/helpers.c
View file @
8ebbc8c0
...
...
@@ -71,35 +71,6 @@ LPWSTR msi_dup_record_field( MSIRECORD *row, INT index )
return
strdupW
(
MSI_RecordGetString
(
row
,
index
)
);
}
LPWSTR
msi_dup_property
(
MSIPACKAGE
*
package
,
LPCWSTR
prop
)
{
DWORD
sz
=
0
;
LPWSTR
str
;
UINT
r
;
r
=
MSI_GetPropertyW
(
package
,
prop
,
NULL
,
&
sz
);
if
(
r
!=
ERROR_SUCCESS
&&
r
!=
ERROR_MORE_DATA
)
return
NULL
;
sz
++
;
str
=
msi_alloc
(
sz
*
sizeof
(
WCHAR
));
r
=
MSI_GetPropertyW
(
package
,
prop
,
str
,
&
sz
);
if
(
r
!=
ERROR_SUCCESS
)
{
msi_free
(
str
);
str
=
NULL
;
}
return
str
;
}
int
msi_get_property_int
(
MSIPACKAGE
*
package
,
LPCWSTR
prop
,
int
def
)
{
LPWSTR
str
=
msi_dup_property
(
package
,
prop
);
int
val
=
str
?
atoiW
(
str
)
:
def
;
msi_free
(
str
);
return
val
;
}
MSICOMPONENT
*
get_loaded_component
(
MSIPACKAGE
*
package
,
LPCWSTR
Component
)
{
MSICOMPONENT
*
comp
;
...
...
dlls/msi/package.c
View file @
8ebbc8c0
...
...
@@ -1001,7 +1001,7 @@ UINT MSI_GetPropertyW( MSIPACKAGE *package, LPCWSTR szName,
if
(
*
pchValueBuf
<=
len
)
{
TRACE
(
"have %lu, need %
l
u -> ERROR_MORE_DATA
\n
"
,
*
pchValueBuf
,
len
);
TRACE
(
"have %lu, need %u -> ERROR_MORE_DATA
\n
"
,
*
pchValueBuf
,
len
);
r
=
ERROR_MORE_DATA
;
}
else
...
...
@@ -1012,6 +1012,28 @@ UINT MSI_GetPropertyW( MSIPACKAGE *package, LPCWSTR szName,
return
r
;
}
LPWSTR
msi_dup_property
(
MSIPACKAGE
*
package
,
LPCWSTR
szName
)
{
msi_property
*
prop
;
LPWSTR
value
=
NULL
;
prop
=
msi_prop_find
(
package
,
szName
);
if
(
prop
)
value
=
strdupW
(
prop
->
value
);
return
value
;
}
int
msi_get_property_int
(
MSIPACKAGE
*
package
,
LPCWSTR
name
,
int
value
)
{
msi_property
*
prop
;
prop
=
msi_prop_find
(
package
,
name
);
if
(
prop
)
value
=
atoiW
(
prop
->
value
);
return
value
;
}
static
UINT
MSI_GetProperty
(
MSIHANDLE
handle
,
LPCWSTR
name
,
awstring
*
szValueBuf
,
DWORD
*
pchValueBuf
)
{
...
...
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