Solved

RegisterDeviceNotification declaration with MFC headers

Posted on 2003-10-28
8
873 Views
Last Modified: 2013-12-03
I'm trying to use RegisterDeviceNotification in a test mfc dialog for proof of concept of something before I turn it into a sevice.  However, I cannot get the function declaration to work that is in winuser.h  Either by letting mfc includes get or by explicity declaring it.

Is there some define that has to be set for those things to be included in the header correctly?  Like how in VS6, you have to redeclare WINVER to be 0x0500 for the structure typedefs that you use with RegisterDeviceNotification to be included correctly in dbt.h
0
Comment
Question by:_corey_
  • 5
  • 2
8 Comments
 
LVL 48

Accepted Solution

by:
AlexFM earned 250 total points
ID: 9639501
0
 
LVL 8

Author Comment

by:_corey_
ID: 9639983
Actually, in the question I point out that I use that as an example and wanted to know if there was another requirement because I refuses to find it.

Also, you know how you can specify specific usb device GUID's?  Well they are defined in some ddk headers which I cannot get a hold of right now.  Could anyone give me these GUIDs for usb and/or joystick type devices?
0
 
LVL 8

Author Comment

by:_corey_
ID: 9640022
Oh, my bad, late night :)   But still the GUID id question?  I'll throw some more points for anyone with that data.  I cannot get a ddk download anywhere or order started.
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 11

Expert Comment

by:robert_marquardt
ID: 9641189
The DDK is not for download anymore.
There is also no GUID for mouse or joystick. Only for individual devices of a single manufacturer.
0
 
LVL 11

Expert Comment

by:robert_marquardt
ID: 9641192
What do you want to achieve?
0
 
LVL 8

Author Comment

by:_corey_
ID: 9643035
Well, that generic usb GUID would do for now then.

I can always check to see if there was actually a device of the type I want plugged in, I just thought there might be sub-category predefined GUIDs but I never found any myself.  But, I also don't have that header.

Yea, the DDK isn't for download anymore, and the page to get it was screwed up, so I was looking for some declarations to use.
0
 
LVL 8

Author Comment

by:_corey_
ID: 9645138
Defining that _WIN32_WINNT seems correct but doesn't have any effect that I can tell, perhaps I have some other problem.

If anyone can give me usbioctl or some file with those guid definitions, I'lll then split the points.
0
 
LVL 8

Author Comment

by:_corey_
ID: 9645672
For those looking it is _WIN32_WINNT not WIN32_WINNT but it does work once you setup the defines correctly (and don't forget a rebuild all).

The order page is finally working so I just ordered the new ddk so I can get the headers/libs correctly instead of hacking it up.  Thanks guys.
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question