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
ecc8e526
Commit
ecc8e526
authored
Feb 18, 2009
by
Ricardo Filipe
Committed by
Alexandre Julliard
Feb 23, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setupapi: Implement SetupPromptForDiskW with only Cancel button active.
parent
7ab7a741
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
139 additions
and
15 deletions
+139
-15
En.rc
dlls/setupapi/En.rc
+23
-0
Makefile.in
dlls/setupapi/Makefile.in
+2
-1
dialog.c
dlls/setupapi/dialog.c
+103
-0
setupapi_private.h
dlls/setupapi/setupapi_private.h
+11
-0
stubs.c
dlls/setupapi/stubs.c
+0
-14
No files found.
dlls/setupapi/En.rc
View file @
ecc8e526
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
* English resources for SETUPAPI
* English resources for SETUPAPI
*
*
* Copyright 2001 Andreas Mohr
* Copyright 2001 Andreas Mohr
* Copyright 2009 Ricardo Filipe
*
*
* This library is free software; you can redistribute it and/or
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* modify it under the terms of the GNU Lesser General Public
...
@@ -20,6 +21,14 @@
...
@@ -20,6 +21,14 @@
LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
STRINGTABLE DISCARDABLE
{
IDS_PROMPTDISK "The file '%s' on %s is needed"
IDS_UNKNOWN "Unknown"
IDS_COPYFROM "Copy files from:"
IDS_INFO "Type the path where the file is located, and then click OK."
}
COPYFILEDLGORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 20, 20, 208, 105
COPYFILEDLGORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 20, 20, 208, 105
STYLE DS_MODALFRAME | DS_SETFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION
STYLE DS_MODALFRAME | DS_SETFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION
CAPTION "Copying Files..."
CAPTION "Copying Files..."
...
@@ -32,3 +41,17 @@ BEGIN
...
@@ -32,3 +41,17 @@ BEGIN
LTEXT "", DESTSTRORD, 7, 41, 194, 22, WS_CHILD | WS_VISIBLE | WS_GROUP
LTEXT "", DESTSTRORD, 7, 41, 194, 22, WS_CHILD | WS_VISIBLE | WS_GROUP
CONTROL "", PROGRESSORD, "setupx_progress", 7, 63, 194, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP
CONTROL "", PROGRESSORD, "setupx_progress", 7, 63, 194, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP
END
END
IDPROMPTFORDISK DIALOG MOVEABLE DISCARDABLE 0, 0, 250, 120
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "Files Needed"
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Insert the manufacturer's installation disk, and then\nmake sure the correct drive is selected below", IDC_FILENEEDED, 10, 10, 175, 22, WS_CHILD | WS_VISIBLE | WS_GROUP
LTEXT "", IDC_INFO, 10, 50, 175, 22, WS_CHILD | WS_VISIBLE | WS_GROUP
LTEXT "Copy manufacturer's files from:", IDC_COPYFROM, 10, 90, 175, 11, WS_CHILD | WS_VISIBLE | WS_GROUP
CONTROL "", IDC_PATH, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 10, 100, 175, 14
PUSHBUTTON "OK", IDOK, 195, 10, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
PUSHBUTTON "Cancel", IDCANCEL, 195, 30, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
PUSHBUTTON "Browse...", IDC_RUNDLG_BROWSE, 195, 100, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
END
dlls/setupapi/Makefile.in
View file @
ecc8e526
...
@@ -6,10 +6,11 @@ VPATH = @srcdir@
...
@@ -6,10 +6,11 @@ VPATH = @srcdir@
MODULE
=
setupapi.dll
MODULE
=
setupapi.dll
IMPORTLIB
=
setupapi
IMPORTLIB
=
setupapi
IMPORTS
=
uuid user32 version advapi32 rpcrt4 kernel32 ntdll
IMPORTS
=
uuid user32 version advapi32 rpcrt4 kernel32 ntdll
DELAYIMPORTS
=
shell32 wintrust ole32 winspool
DELAYIMPORTS
=
shell32 wintrust ole32 winspool
comdlg32
C_SRCS
=
\
C_SRCS
=
\
devinst.c
\
devinst.c
\
dialog.c
\
dirid.c
\
dirid.c
\
diskspace.c
\
diskspace.c
\
fakedll.c
\
fakedll.c
\
...
...
dlls/setupapi/dialog.c
0 → 100644
View file @
ecc8e526
/*
* SetupAPI dialog functions
*
* Copyright 2009 Ricardo Filipe
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
#include "wine/debug.h"
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "winreg.h"
#include "commdlg.h"
#include "setupapi.h"
#include "winnls.h"
#include "setupapi_private.h"
#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
setupapi
);
struct
promptdisk_params
{
PCWSTR
DialogTitle
;
PCWSTR
DiskName
;
PCWSTR
PathToSource
;
PCWSTR
FileSought
;
PCWSTR
TagFile
;
DWORD
DiskPromptStyle
;
PWSTR
PathBuffer
;
DWORD
PathBufferSize
;
PDWORD
PathRequiredSize
;
};
/* Handles the messages sent to the SetupPromptForDisk dialog
*/
static
INT_PTR
CALLBACK
promptdisk_proc
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
switch
(
msg
)
{
case
WM_COMMAND
:
switch
(
wParam
)
{
case
IDCANCEL
:
EndDialog
(
hwnd
,
DPROMPT_CANCEL
);
return
TRUE
;
}
}
return
FALSE
;
}
/***********************************************************************
* SetupPromptForDiskW (SETUPAPI.@)
*/
UINT
WINAPI
SetupPromptForDiskW
(
HWND
hwndParent
,
PCWSTR
DialogTitle
,
PCWSTR
DiskName
,
PCWSTR
PathToSource
,
PCWSTR
FileSought
,
PCWSTR
TagFile
,
DWORD
DiskPromptStyle
,
PWSTR
PathBuffer
,
DWORD
PathBufferSize
,
PDWORD
PathRequiredSize
)
{
struct
promptdisk_params
params
;
UINT
ret
;
TRACE
(
"%p, %s, %s, %s, %s, %s, 0x%08x, %p, %d, %p
\n
"
,
hwndParent
,
debugstr_w
(
DialogTitle
),
debugstr_w
(
DiskName
),
debugstr_w
(
PathToSource
),
debugstr_w
(
FileSought
),
debugstr_w
(
TagFile
),
DiskPromptStyle
,
PathBuffer
,
PathBufferSize
,
PathRequiredSize
);
if
(
!
FileSought
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
DPROMPT_CANCEL
;
}
params
.
DialogTitle
=
DialogTitle
;
params
.
DiskName
=
DiskName
;
params
.
PathToSource
=
PathToSource
;
params
.
FileSought
=
FileSought
;
params
.
TagFile
=
TagFile
;
params
.
DiskPromptStyle
=
DiskPromptStyle
;
params
.
PathBuffer
=
PathBuffer
;
params
.
PathBufferSize
=
PathBufferSize
;
params
.
PathRequiredSize
=
PathRequiredSize
;
ret
=
DialogBoxParamW
(
SETUPAPI_hInstance
,
MAKEINTRESOURCEW
(
IDPROMPTFORDISK
),
hwndParent
,
promptdisk_proc
,
(
LPARAM
)
&
params
);
if
(
ret
==
DPROMPT_CANCEL
)
SetLastError
(
ERROR_CANCELLED
);
return
ret
;
}
dlls/setupapi/setupapi_private.h
View file @
ecc8e526
...
@@ -24,6 +24,17 @@
...
@@ -24,6 +24,17 @@
#define DESTSTRORD 501
#define DESTSTRORD 501
#define PROGRESSORD 502
#define PROGRESSORD 502
#define IDPROMPTFORDISK 1001
#define IDC_FILENEEDED 503
#define IDC_INFO 504
#define IDC_COPYFROM 505
#define IDC_PATH 506
#define IDC_RUNDLG_BROWSE 507
#define IDS_PROMPTDISK 508
#define IDS_UNKNOWN 509
#define IDS_COPYFROM 510
#define IDS_INFO 511
#define REG_INSTALLEDFILES "System\\CurrentControlSet\\Control\\InstalledFiles"
#define REG_INSTALLEDFILES "System\\CurrentControlSet\\Control\\InstalledFiles"
#define REGPART_RENAME "\\Rename"
#define REGPART_RENAME "\\Rename"
...
...
dlls/setupapi/stubs.c
View file @
ecc8e526
...
@@ -261,20 +261,6 @@ UINT WINAPI SetupPromptForDiskA(HWND hwndParent, PCSTR DialogTitle, PCSTR DiskNa
...
@@ -261,20 +261,6 @@ UINT WINAPI SetupPromptForDiskA(HWND hwndParent, PCSTR DialogTitle, PCSTR DiskNa
}
}
/***********************************************************************
/***********************************************************************
* SetupPromptForDiskW (SETUPAPI.@)
*/
UINT
WINAPI
SetupPromptForDiskW
(
HWND
hwndParent
,
PCWSTR
DialogTitle
,
PCWSTR
DiskName
,
PCWSTR
PathToSource
,
PCWSTR
FileSought
,
PCWSTR
TagFile
,
DWORD
DiskPromptStyle
,
PWSTR
PathBuffer
,
DWORD
PathBufferSize
,
PDWORD
PathRequiredSize
)
{
FIXME
(
"%p %s %s %s %s %s %d %p %d %p: stub
\n
"
,
hwndParent
,
debugstr_w
(
DialogTitle
),
debugstr_w
(
DiskName
),
debugstr_w
(
PathToSource
),
debugstr_w
(
FileSought
),
debugstr_w
(
TagFile
),
DiskPromptStyle
,
PathBuffer
,
PathBufferSize
,
PathRequiredSize
);
return
0
;
}
/***********************************************************************
* CM_Locate_DevNodeA (SETUPAPI.@)
* CM_Locate_DevNodeA (SETUPAPI.@)
*/
*/
CONFIGRET
WINAPI
CM_Locate_DevNodeA
(
PDEVINST
pdnDevInst
,
DEVINSTID_A
pDeviceID
,
ULONG
ulFlags
)
CONFIGRET
WINAPI
CM_Locate_DevNodeA
(
PDEVINST
pdnDevInst
,
DEVINSTID_A
pDeviceID
,
ULONG
ulFlags
)
...
...
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