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
3902efc9
Commit
3902efc9
authored
Sep 07, 2010
by
Andrew Nguyen
Committed by
Alexandre Julliard
Sep 07, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setupapi: Implement SetupQuerySpaceRequiredOnDriveW.
parent
188ed272
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
6 deletions
+46
-6
diskspace.c
dlls/setupapi/diskspace.c
+45
-5
setupapi.spec
dlls/setupapi/setupapi.spec
+1
-1
No files found.
dlls/setupapi/diskspace.c
View file @
3902efc9
...
...
@@ -115,20 +115,26 @@ BOOL WINAPI SetupAddInstallSectionToDiskSpaceListA(HDSKSPC DiskSpace,
}
/***********************************************************************
* SetupQuerySpaceRequiredOnDrive
A
(SETUPAPI.@)
* SetupQuerySpaceRequiredOnDrive
W
(SETUPAPI.@)
*/
BOOL
WINAPI
SetupQuerySpaceRequiredOnDrive
A
(
HDSKSPC
DiskSpace
,
LPC
STR
DriveSpec
,
LONGLONG
*
SpaceRequired
,
BOOL
WINAPI
SetupQuerySpaceRequiredOnDrive
W
(
HDSKSPC
DiskSpace
,
LPC
WSTR
DriveSpec
,
LONGLONG
*
SpaceRequired
,
PVOID
Reserved1
,
UINT
Reserved2
)
{
WCHAR
driveW
[
20
]
;
WCHAR
*
driveW
;
unsigned
int
i
;
LPDISKSPACELIST
list
=
DiskSpace
;
BOOL
rc
=
FALSE
;
static
const
WCHAR
bkslsh
[]
=
{
'\\'
,
0
};
MultiByteToWideChar
(
CP_ACP
,
0
,
DriveSpec
,
-
1
,
driveW
,
20
);
driveW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
lstrlenW
(
DriveSpec
)
+
2
);
if
(
!
driveW
)
{
SetLastError
(
ERROR_NOT_ENOUGH_MEMORY
);
return
FALSE
;
}
lstrcpyW
(
driveW
,
DriveSpec
);
lstrcatW
(
driveW
,
bkslsh
);
TRACE
(
"Looking for drive %s
\n
"
,
debugstr_w
(
driveW
));
...
...
@@ -144,10 +150,44 @@ BOOL WINAPI SetupQuerySpaceRequiredOnDriveA(HDSKSPC DiskSpace,
}
}
HeapFree
(
GetProcessHeap
(),
0
,
driveW
);
return
rc
;
}
/***********************************************************************
* SetupQuerySpaceRequiredOnDriveA (SETUPAPI.@)
*/
BOOL
WINAPI
SetupQuerySpaceRequiredOnDriveA
(
HDSKSPC
DiskSpace
,
LPCSTR
DriveSpec
,
LONGLONG
*
SpaceRequired
,
PVOID
Reserved1
,
UINT
Reserved2
)
{
LPWSTR
DriveSpecW
=
NULL
;
BOOL
ret
;
if
(
DriveSpec
)
{
DWORD
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
DriveSpec
,
-
1
,
NULL
,
0
);
DriveSpecW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
if
(
!
DriveSpecW
)
{
SetLastError
(
ERROR_NOT_ENOUGH_MEMORY
);
return
FALSE
;
}
MultiByteToWideChar
(
CP_ACP
,
0
,
DriveSpec
,
-
1
,
DriveSpecW
,
len
);
}
ret
=
SetupQuerySpaceRequiredOnDriveW
(
DiskSpace
,
DriveSpecW
,
SpaceRequired
,
Reserved1
,
Reserved2
);
HeapFree
(
GetProcessHeap
(),
0
,
DriveSpecW
);
return
ret
;
}
/***********************************************************************
* SetupDestroyDiskSpaceList (SETUPAPI.@)
*/
BOOL
WINAPI
SetupDestroyDiskSpaceList
(
HDSKSPC
DiskSpace
)
...
...
dlls/setupapi/setupapi.spec
View file @
3902efc9
...
...
@@ -482,7 +482,7 @@
@ stub SetupQuerySourceListA
@ stub SetupQuerySourceListW
@ stdcall SetupQuerySpaceRequiredOnDriveA(long str ptr ptr long)
@ st
ub SetupQuerySpaceRequiredOnDriveW
@ st
dcall SetupQuerySpaceRequiredOnDriveW(long wstr ptr ptr long)
@ stdcall SetupQueueCopyA(long str str str str str str str long)
@ stdcall SetupQueueCopyIndirectA(ptr)
@ stdcall SetupQueueCopyIndirectW(ptr)
...
...
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