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
aaa4b42c
Commit
aaa4b42c
authored
Jan 06, 2005
by
Mike McCormack
Committed by
Alexandre Julliard
Jan 06, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix records according to test cases.
parent
eb45ce57
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
15 deletions
+48
-15
record.c
dlls/msi/record.c
+48
-15
No files found.
dlls/msi/record.c
View file @
aaa4b42c
...
@@ -77,10 +77,13 @@ MSIRECORD *MSI_CreateRecord( unsigned int cParams )
...
@@ -77,10 +77,13 @@ MSIRECORD *MSI_CreateRecord( unsigned int cParams )
TRACE
(
"%d
\n
"
,
cParams
);
TRACE
(
"%d
\n
"
,
cParams
);
if
(
cParams
>
65535
)
return
NULL
;
len
=
sizeof
(
MSIRECORD
)
+
sizeof
(
MSIFIELD
)
*
cParams
;
len
=
sizeof
(
MSIRECORD
)
+
sizeof
(
MSIFIELD
)
*
cParams
;
rec
=
alloc_msiobject
(
MSIHANDLETYPE_RECORD
,
len
,
MSI_CloseRecord
);
rec
=
alloc_msiobject
(
MSIHANDLETYPE_RECORD
,
len
,
MSI_CloseRecord
);
if
(
rec
)
if
(
rec
)
rec
->
count
=
cParams
;
rec
->
count
=
cParams
;
return
rec
;
return
rec
;
}
}
...
@@ -111,10 +114,7 @@ unsigned int WINAPI MsiRecordGetFieldCount( MSIHANDLE handle )
...
@@ -111,10 +114,7 @@ unsigned int WINAPI MsiRecordGetFieldCount( MSIHANDLE handle )
rec
=
msihandle2msiinfo
(
handle
,
MSIHANDLETYPE_RECORD
);
rec
=
msihandle2msiinfo
(
handle
,
MSIHANDLETYPE_RECORD
);
if
(
!
rec
)
if
(
!
rec
)
{
return
-
1
;
ERR
(
"Record not found!
\n
"
);
return
0
;
}
msiobj_lock
(
&
rec
->
hdr
);
msiobj_lock
(
&
rec
->
hdr
);
ret
=
MSI_RecordGetFieldCount
(
rec
);
ret
=
MSI_RecordGetFieldCount
(
rec
);
...
@@ -217,12 +217,12 @@ UINT MSI_RecordSetInteger( MSIRECORD *rec, unsigned int iField, int iVal )
...
@@ -217,12 +217,12 @@ UINT MSI_RecordSetInteger( MSIRECORD *rec, unsigned int iField, int iVal )
{
{
TRACE
(
"%p %u %d
\n
"
,
rec
,
iField
,
iVal
);
TRACE
(
"%p %u %d
\n
"
,
rec
,
iField
,
iVal
);
if
(
iField
<=
rec
->
count
)
if
(
iField
>
rec
->
count
)
{
return
ERROR_INVALID_PARAMETER
;
MSI_FreeField
(
&
rec
->
fields
[
iField
]
);
rec
->
fields
[
iField
].
type
=
MSIFIELD_INT
;
MSI_FreeField
(
&
rec
->
fields
[
iField
]
)
;
rec
->
fields
[
iField
].
u
.
iVal
=
iVal
;
rec
->
fields
[
iField
].
type
=
MSIFIELD_INT
;
}
rec
->
fields
[
iField
].
u
.
iVal
=
iVal
;
return
ERROR_SUCCESS
;
return
ERROR_SUCCESS
;
}
}
...
@@ -266,7 +266,7 @@ BOOL WINAPI MsiRecordIsNull( MSIHANDLE handle, unsigned int iField )
...
@@ -266,7 +266,7 @@ BOOL WINAPI MsiRecordIsNull( MSIHANDLE handle, unsigned int iField )
rec
=
msihandle2msiinfo
(
handle
,
MSIHANDLETYPE_RECORD
);
rec
=
msihandle2msiinfo
(
handle
,
MSIHANDLETYPE_RECORD
);
if
(
!
rec
)
if
(
!
rec
)
return
ERROR_INVALID_HANDLE
;
return
0
;
msiobj_lock
(
&
rec
->
hdr
);
msiobj_lock
(
&
rec
->
hdr
);
ret
=
MSI_RecordIsNull
(
rec
,
iField
);
ret
=
MSI_RecordIsNull
(
rec
,
iField
);
msiobj_unlock
(
&
rec
->
hdr
);
msiobj_unlock
(
&
rec
->
hdr
);
...
@@ -299,9 +299,12 @@ UINT MSI_RecordGetStringA(MSIRECORD *rec, unsigned int iField,
...
@@ -299,9 +299,12 @@ UINT MSI_RecordGetStringA(MSIRECORD *rec, unsigned int iField,
NULL
,
0
,
NULL
,
NULL
);
NULL
,
0
,
NULL
,
NULL
);
WideCharToMultiByte
(
CP_ACP
,
0
,
rec
->
fields
[
iField
].
u
.
szwVal
,
-
1
,
WideCharToMultiByte
(
CP_ACP
,
0
,
rec
->
fields
[
iField
].
u
.
szwVal
,
-
1
,
szValue
,
*
pcchValue
,
NULL
,
NULL
);
szValue
,
*
pcchValue
,
NULL
,
NULL
);
if
(
*
pcchValue
&&
len
>*
pcchValue
)
szValue
[
*
pcchValue
-
1
]
=
0
;
if
(
len
)
len
--
;
break
;
break
;
case
MSIFIELD_NULL
:
case
MSIFIELD_NULL
:
len
=
1
;
if
(
*
pcchValue
>
0
)
if
(
*
pcchValue
>
0
)
szValue
[
0
]
=
0
;
szValue
[
0
]
=
0
;
break
;
break
;
...
@@ -404,12 +407,42 @@ UINT WINAPI MsiRecordGetStringW(MSIHANDLE handle, unsigned int iField,
...
@@ -404,12 +407,42 @@ UINT WINAPI MsiRecordGetStringW(MSIHANDLE handle, unsigned int iField,
return
ret
;
return
ret
;
}
}
UINT
WINAPI
MsiRecordDataSize
(
MSIHANDLE
hRecord
,
unsigned
int
iField
)
UINT
MSI_RecordDataSize
(
MSIRECORD
*
rec
,
unsigned
int
iField
)
{
{
FIXME
(
"%ld %d
\n
"
,
hRecord
,
iField
);
TRACE
(
"%p %d
\n
"
,
rec
,
iField
);
if
(
iField
>
rec
->
count
)
return
0
;
switch
(
rec
->
fields
[
iField
].
type
)
{
case
MSIFIELD_INT
:
return
sizeof
(
INT
);
case
MSIFIELD_WSTR
:
return
lstrlenW
(
rec
->
fields
[
iField
].
u
.
szwVal
);
case
MSIFIELD_NULL
:
break
;
}
return
0
;
return
0
;
}
}
UINT
WINAPI
MsiRecordDataSize
(
MSIHANDLE
handle
,
unsigned
int
iField
)
{
MSIRECORD
*
rec
;
UINT
ret
;
TRACE
(
"%ld %d
\n
"
,
handle
,
iField
);
rec
=
msihandle2msiinfo
(
handle
,
MSIHANDLETYPE_RECORD
);
if
(
!
rec
)
return
0
;
msiobj_lock
(
&
rec
->
hdr
);
ret
=
MSI_RecordDataSize
(
rec
,
iField
);
msiobj_unlock
(
&
rec
->
hdr
);
msiobj_release
(
&
rec
->
hdr
);
return
ret
;
}
UINT
MSI_RecordSetStringA
(
MSIRECORD
*
rec
,
unsigned
int
iField
,
LPCSTR
szValue
)
UINT
MSI_RecordSetStringA
(
MSIRECORD
*
rec
,
unsigned
int
iField
,
LPCSTR
szValue
)
{
{
LPWSTR
str
;
LPWSTR
str
;
...
...
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