Programming style...
- From: Wan-Hi <WanHi@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 29 May 2005 15:06:04 -0700
originated in the java corner, i have some difficulties to adapt the
programming style used in the platform sdk and the ddk. therefore i'd like to
know what you think about the way i handled some things.
1) device interface GUIDs not defined in a global header:
i tried to find the GUID of disc type devices which are part of the mass
storage device group. because i didn't find any, i looked up the GUID value
stored in my registry and defined it in my app. is this a bad habit or can i
assume that this GUID never changes in further versions of ms win?
2) error checking:
SetupDiGetClassDevs and many other functions return a specific value if they
fail. so should i check for failure although such case is impossible? e.g.
SetupDiGetClassDevs with GUID_DEVINTERFACE_VOLUME should never fail. i ask
because useless failure checks make the code unreadable.
.
- Follow-Ups:
- Re: Programming style...
- From: Robert Marquardt
- Re: Programming style...
- From: Don Burn
- Re: Programming style...
- Prev by Date: Renaming a file
- Next by Date: Re: Keyboard extension
- Previous by thread: Renaming a file
- Next by thread: Re: Programming style...
- Index(es):
Relevant Pages
|