Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Win32WindowDemo.java #287

Merged
merged 4 commits into from
Nov 6, 2013
Merged

Updated Win32WindowDemo.java #287

merged 4 commits into from
Nov 6, 2013

Conversation

daifei4321
Copy link
Contributor

That demo does not work on my machine. So I tried to fixed it. Works on my machine now for detecting: add/remove CD, add/remove removeable hard drive.
I changed the parent window to null, because it doesn't work with device change, but I don't know why. I tested: the other function of this demo (onMachineLocked/onMachineUnlocked) can still work after my changing.

Added setting dbcc_size before RegisterDeviceNotification.
Create DEV_BROADCAST_DEVICEINTERFACE only when should.
Added extra info (drive letter, change to media in drive or to physical drive, is network drive) for logic drive add/remove.
Used DBT.DBTF_MEDIA to replace 1.
Used DBT.DBTF_NET to replace 2.
@dblock
Copy link
Member

dblock commented Oct 25, 2013

Thanks! Could you please update CHANGELOG?

@daifei4321
Copy link
Contributor Author

-) Updated CHANGES.md

dblock added a commit that referenced this pull request Nov 6, 2013
Updated Win32WindowDemo.java
@dblock dblock merged commit 667fdd1 into java-native-access:master Nov 6, 2013
@dblock
Copy link
Member

dblock commented Nov 6, 2013

Merged, awesome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants