RFC: w32api-CVS_HEAD-20031223-pechtcha<at>cs.nyu.edu setupapi.def missing some functions
Igor Pechtchanski <[email protected]> Tue, 23 Dec 2003 14:00:47 -0500 (EST)
| Newsgroups | gmane.comp.gnu.mingw.patches |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I was trying to compile DevEject [1], and it used CM_Request_Device_Eject,
which is declared in ddk/cfgmgr32.h, but isn't exported from setupapi.def
(and, consequently, from /usr/lib/w32api/libsetupapi.a). The project also
uses the DN_REMOVABLE, DN_STARTED, and DN_DRIVER_LOADED constants that
should have been defined in the DDK headers, but weren't.
I'm attaching a patch (and the corresponding ChangeLog) for setupapi.def
that exports all incarnations of CM_Request_Device_Eject{,_Ex}. BTW, I
initially thought these functions belonged in ddk/cfgmgr32.def, so I
looked at that file, and it seems to contain 2 copies of almost every
export... Is that by design?
I also found the definitions for the DN_* constants, but I'm not sure
which file they should go in. I've attached a *new* file, dndefs.h, that
contains all the constants. If someone could point me to the correct
header that should define them, I'll submit another patch.
Igor
[1] <http://www.hoopyfrood.net/DevEject/>
--
http://cs.nyu.edu/~pechtcha/
|\ _,,,---,,_ [email protected]
ZZZzz /,`.-'`' -. ;-;;,_ [email protected]
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D.
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster." -- Patrick Naughton
setupapi-add-CM_Request_Device_Eject.patch
(text/plain, 620 B)
Index: setupapi.def =================================================================== RCS file: /cvs/src/src/winsup/w32api/lib/setupapi.def,v retrieving revision 1.1 diff -u -p -r1.1 setupapi.def --- setupapi.def 21 Aug 2001 13:58:52 -0000 1.1 +++ setupapi.def 16 Dec 2003 22:37:36 -0000 @@ -5,6 +5,10 @@ AddMiniIconToList@8 AddTagToGroupOrderListEntry@12 AppendStringToMultiSz@24 AssertFail@12 +CM_Request_Device_EjectA@20 +CM_Request_Device_EjectW@20 +CM_Request_Device_Eject_ExA@24 +CM_Request_Device_Eject_ExW@24 CaptureAndConvertAnsiArg@8 CaptureStringArg@8 CenterWindowRelativeToParent@4
setupapi-add-CM_Request_Device_Eject.ChangeLog
(text/plain, 158 B)
2003-12-16 Igor Pechtchanski <[email protected]> * setupapi.def: Add exports for CM_Request_Device_Eject[AW] and CM_Request_Device_Eject_Ex[AW].
dndefs.h
(text/plain, 1.2 KB)
#ifndef _DNDEFS_H #define _DNDEFS_H #define DN_ROOT_ENUMERATED 0x00000001 // Was enumerated by ROOT #define DN_DRIVER_LOADED 0x00000002 // Has Register_Device_Driver #define DN_ENUM_LOADED 0x00000004 // Has Register_Enumerator #define DN_STARTED 0x00000008 // Is currently configured #define DN_MANUAL 0x00000010 // Manually installed #define DN_NEED_TO_ENUM 0x00000020 // May need reenumeration #define DN_NOT_FIRST_TIME 0x00000040 // Has received a config #define DN_HARDWARE_ENUM 0x00000080 // Enum generates hardware ID #define DN_LIAR 0x00000100 // Lied about can reconfig once #define DN_HAS_MARK 0x00000200 // Not CM_Create_DevNode lately #define DN_HAS_PROBLEM 0x00000400 // Need device installer #define DN_FILTERED 0x00000800 // Is filtered #define DN_MOVED 0x00001000 // Has been moved #define DN_DISABLEABLE 0x00002000 // Can be rebalanced #define DN_REMOVABLE 0x00004000 // Can be removed #define DN_PRIVATE_PROBLEM 0x00008000 // Has a private problem #define DN_MF_PARENT 0x00010000 // Multi function parent #define DN_MF_CHILD 0x00020000 // Multi function child #define DN_WILL_BE_REMOVED 0x00040000 // Devnode is being removed #endif // _DNDEFS_H