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
24eb38bd
Commit
24eb38bd
authored
Nov 18, 2008
by
Francois Gouget
Committed by
Alexandre Julliard
Nov 19, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Fix create_scsi_entry() so it puts properly '\0'-terminated strings in the registry.
parent
500be1e8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
oldconfig.c
dlls/kernel32/oldconfig.c
+11
-11
No files found.
dlls/kernel32/oldconfig.c
View file @
24eb38bd
...
...
@@ -105,7 +105,7 @@ static void create_scsi_entry( PSCSI_ADDRESS scsi_addr, LPCSTR lpDriver, UINT uD
OBJECT_ATTRIBUTES
attr
;
UNICODE_STRING
nameW
;
WCHAR
dataW
[
50
];
DWORD
len
W
;
DWORD
size
W
;
char
buffer
[
40
];
DWORD
value
;
const
char
*
data
;
...
...
@@ -145,8 +145,8 @@ static void create_scsi_entry( PSCSI_ADDRESS scsi_addr, LPCSTR lpDriver, UINT uD
RtlFreeUnicodeString
(
&
nameW
);
RtlCreateUnicodeStringFromAsciiz
(
&
nameW
,
"Driver"
);
RtlMultiByteToUnicodeN
(
dataW
,
sizeof
(
dataW
),
&
lenW
,
lpDriver
,
strlen
(
lpDriver
)
);
NtSetValueKey
(
portKey
,
&
nameW
,
0
,
REG_SZ
,
(
BYTE
*
)
dataW
,
len
W
);
RtlMultiByteToUnicodeN
(
dataW
,
sizeof
(
dataW
),
&
sizeW
,
lpDriver
,
strlen
(
lpDriver
)
+
1
);
NtSetValueKey
(
portKey
,
&
nameW
,
0
,
REG_SZ
,
(
BYTE
*
)
dataW
,
size
W
);
RtlFreeUnicodeString
(
&
nameW
);
value
=
10
;
RtlCreateUnicodeStringFromAsciiz
(
&
nameW
,
"FirstBusTimeScanInMs"
);
...
...
@@ -233,26 +233,26 @@ static void create_scsi_entry( PSCSI_ADDRESS scsi_addr, LPCSTR lpDriver, UINT uD
break
;
}
RtlCreateUnicodeStringFromAsciiz
(
&
nameW
,
"Type"
);
RtlMultiByteToUnicodeN
(
dataW
,
sizeof
(
dataW
),
&
lenW
,
data
,
strlen
(
data
)
);
NtSetValueKey
(
lunKey
,
&
nameW
,
0
,
REG_SZ
,
(
BYTE
*
)
dataW
,
len
W
);
RtlMultiByteToUnicodeN
(
dataW
,
sizeof
(
dataW
),
&
sizeW
,
data
,
strlen
(
data
)
+
1
);
NtSetValueKey
(
lunKey
,
&
nameW
,
0
,
REG_SZ
,
(
BYTE
*
)
dataW
,
size
W
);
RtlFreeUnicodeString
(
&
nameW
);
RtlCreateUnicodeStringFromAsciiz
(
&
nameW
,
"Identifier"
);
RtlMultiByteToUnicodeN
(
dataW
,
sizeof
(
dataW
),
&
lenW
,
lpDriveName
,
strlen
(
lpDriveName
)
);
NtSetValueKey
(
lunKey
,
&
nameW
,
0
,
REG_SZ
,
(
BYTE
*
)
dataW
,
len
W
);
RtlMultiByteToUnicodeN
(
dataW
,
sizeof
(
dataW
),
&
sizeW
,
lpDriveName
,
strlen
(
lpDriveName
)
+
1
);
NtSetValueKey
(
lunKey
,
&
nameW
,
0
,
REG_SZ
,
(
BYTE
*
)
dataW
,
size
W
);
RtlFreeUnicodeString
(
&
nameW
);
if
(
uDriveType
==
DRIVE_CDROM
||
uDriveType
==
DRIVE_REMOVABLE
)
{
RtlCreateUnicodeStringFromAsciiz
(
&
nameW
,
"DeviceName"
);
RtlMultiByteToUnicodeN
(
dataW
,
sizeof
(
dataW
),
&
lenW
,
buffer
,
strlen
(
buffer
)
);
NtSetValueKey
(
lunKey
,
&
nameW
,
0
,
REG_SZ
,
(
BYTE
*
)
dataW
,
len
W
);
RtlMultiByteToUnicodeN
(
dataW
,
sizeof
(
dataW
),
&
sizeW
,
buffer
,
strlen
(
buffer
)
+
1
);
NtSetValueKey
(
lunKey
,
&
nameW
,
0
,
REG_SZ
,
(
BYTE
*
)
dataW
,
size
W
);
RtlFreeUnicodeString
(
&
nameW
);
}
RtlCreateUnicodeStringFromAsciiz
(
&
nameW
,
"UnixDeviceName"
);
RtlMultiByteToUnicodeN
(
dataW
,
sizeof
(
dataW
),
&
lenW
,
lpUnixDeviceName
,
strlen
(
lpUnixDeviceName
)
);
NtSetValueKey
(
lunKey
,
&
nameW
,
0
,
REG_SZ
,
(
BYTE
*
)
dataW
,
len
W
);
RtlMultiByteToUnicodeN
(
dataW
,
sizeof
(
dataW
),
&
sizeW
,
lpUnixDeviceName
,
strlen
(
lpUnixDeviceName
)
+
1
);
NtSetValueKey
(
lunKey
,
&
nameW
,
0
,
REG_SZ
,
(
BYTE
*
)
dataW
,
size
W
);
RtlFreeUnicodeString
(
&
nameW
);
NtClose
(
lunKey
);
...
...
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