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
4fab9ff2
Commit
4fab9ff2
authored
Feb 02, 2023
by
Mohamad Al-Jaf
Committed by
Alexandre Julliard
Mar 30, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cfgmgr32: Implement CM_MapCrToWin32Err.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=53781
parent
a98d9dd9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
63 additions
and
0 deletions
+63
-0
Makefile.in
dlls/cfgmgr32/Makefile.in
+3
-0
cfgmgr32.spec
dlls/cfgmgr32/cfgmgr32.spec
+1
-0
main.c
dlls/cfgmgr32/main.c
+58
-0
cfgmgr32.h
include/cfgmgr32.h
+1
-0
No files found.
dlls/cfgmgr32/Makefile.in
View file @
4fab9ff2
MODULE
=
cfgmgr32.dll
MODULE
=
cfgmgr32.dll
IMPORTLIB
=
cfgmgr32
IMPORTLIB
=
cfgmgr32
IMPORTS
=
setupapi
IMPORTS
=
setupapi
C_SRCS
=
\
main.c
dlls/cfgmgr32/cfgmgr32.spec
View file @
4fab9ff2
...
@@ -126,6 +126,7 @@
...
@@ -126,6 +126,7 @@
@ stdcall CM_Locate_DevNodeW(ptr wstr long) setupapi.CM_Locate_DevNodeW
@ stdcall CM_Locate_DevNodeW(ptr wstr long) setupapi.CM_Locate_DevNodeW
@ stdcall CM_Locate_DevNode_ExA(ptr str long long) setupapi.CM_Locate_DevNode_ExA
@ stdcall CM_Locate_DevNode_ExA(ptr str long long) setupapi.CM_Locate_DevNode_ExA
@ stdcall CM_Locate_DevNode_ExW(ptr wstr long long) setupapi.CM_Locate_DevNode_ExW
@ stdcall CM_Locate_DevNode_ExW(ptr wstr long long) setupapi.CM_Locate_DevNode_ExW
@ stdcall CM_MapCrToWin32Err(long long)
@ stub CM_Merge_Range_List
@ stub CM_Merge_Range_List
@ stub CM_Modify_Res_Des
@ stub CM_Modify_Res_Des
@ stub CM_Modify_Res_Des_Ex
@ stub CM_Modify_Res_Des_Ex
...
...
dlls/cfgmgr32/main.c
0 → 100644
View file @
4fab9ff2
/*
* Copyright (C) 2023 Mohamad Al-Jaf
*
* 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 "wine/debug.h"
#include "cfgmgr32.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
setupapi
);
/***********************************************************************
* CM_MapCrToWin32Err (cfgmgr32.@)
*/
DWORD
WINAPI
CM_MapCrToWin32Err
(
CONFIGRET
code
,
DWORD
default_error
)
{
TRACE
(
"code: %#lx, default_error: %ld
\n
"
,
code
,
default_error
);
switch
(
code
)
{
case
CR_SUCCESS
:
return
ERROR_SUCCESS
;
case
CR_OUT_OF_MEMORY
:
return
ERROR_NOT_ENOUGH_MEMORY
;
case
CR_INVALID_POINTER
:
return
ERROR_INVALID_USER_BUFFER
;
case
CR_INVALID_FLAG
:
return
ERROR_INVALID_FLAGS
;
case
CR_INVALID_DEVNODE
:
case
CR_INVALID_DEVICE_ID
:
case
CR_INVALID_MACHINENAME
:
case
CR_INVALID_PROPERTY
:
case
CR_INVALID_REFERENCE_STRING
:
return
ERROR_INVALID_DATA
;
case
CR_NO_SUCH_DEVNODE
:
case
CR_NO_SUCH_VALUE
:
case
CR_NO_SUCH_DEVICE_INTERFACE
:
return
ERROR_NOT_FOUND
;
case
CR_ALREADY_SUCH_DEVNODE
:
return
ERROR_ALREADY_EXISTS
;
case
CR_BUFFER_SMALL
:
return
ERROR_INSUFFICIENT_BUFFER
;
case
CR_NO_REGISTRY_HANDLE
:
return
ERROR_INVALID_HANDLE
;
case
CR_REGISTRY_ERROR
:
return
ERROR_REGISTRY_CORRUPT
;
case
CR_NO_SUCH_REGISTRY_KEY
:
return
ERROR_FILE_NOT_FOUND
;
case
CR_REMOTE_COMM_FAILURE
:
case
CR_MACHINE_UNAVAILABLE
:
case
CR_NO_CM_SERVICES
:
return
ERROR_SERVICE_NOT_ACTIVE
;
case
CR_ACCESS_DENIED
:
return
ERROR_ACCESS_DENIED
;
case
CR_CALL_NOT_IMPLEMENTED
:
return
ERROR_CALL_NOT_IMPLEMENTED
;
}
return
default_error
;
}
include/cfgmgr32.h
View file @
4fab9ff2
...
@@ -242,6 +242,7 @@ CMAPI WORD WINAPI CM_Get_Version(void);
...
@@ -242,6 +242,7 @@ CMAPI WORD WINAPI CM_Get_Version(void);
CMAPI
CONFIGRET
WINAPI
CM_Locate_DevNodeA
(
PDEVINST
,
DEVINSTID_A
,
ULONG
);
CMAPI
CONFIGRET
WINAPI
CM_Locate_DevNodeA
(
PDEVINST
,
DEVINSTID_A
,
ULONG
);
CMAPI
CONFIGRET
WINAPI
CM_Locate_DevNodeW
(
PDEVINST
,
DEVINSTID_W
,
ULONG
);
CMAPI
CONFIGRET
WINAPI
CM_Locate_DevNodeW
(
PDEVINST
,
DEVINSTID_W
,
ULONG
);
#define CM_Locate_DevNode WINELIB_NAME_AW(CM_Locate_DevNode)
#define CM_Locate_DevNode WINELIB_NAME_AW(CM_Locate_DevNode)
CMAPI
DWORD
WINAPI
CM_MapCrToWin32Err
(
CONFIGRET
,
DWORD
);
CMAPI
CONFIGRET
WINAPI
CM_Open_DevNode_Key
(
DEVINST
dnDevInst
,
REGSAM
access
,
ULONG
ulHardwareProfile
,
CMAPI
CONFIGRET
WINAPI
CM_Open_DevNode_Key
(
DEVINST
dnDevInst
,
REGSAM
access
,
ULONG
ulHardwareProfile
,
REGDISPOSITION
disposition
,
PHKEY
phkDevice
,
ULONG
ulFlags
);
REGDISPOSITION
disposition
,
PHKEY
phkDevice
,
ULONG
ulFlags
);
CMAPI
CONFIGRET
WINAPI
CM_Request_Device_EjectA
(
DEVINST
dev
,
PPNP_VETO_TYPE
type
,
LPSTR
name
,
ULONG
length
,
ULONG
flags
);
CMAPI
CONFIGRET
WINAPI
CM_Request_Device_EjectA
(
DEVINST
dev
,
PPNP_VETO_TYPE
type
,
LPSTR
name
,
ULONG
length
,
ULONG
flags
);
...
...
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