Skip to content

Commit

Permalink
Update Win32WindowDemo.java
Browse files Browse the repository at this point in the history
Used DBT.DBTF_MEDIA to replace 1.
Used DBT.DBTF_NET to replace 2.
  • Loading branch information
daifei4321 committed Oct 25, 2013
1 parent 30b64fb commit a41d97d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,8 @@ protected LRESULT onDeviceChangeArrivalOrRemoveComplete(LPARAM lParam, String ac
DEV_BROADCAST_VOLUME bvl = new DEV_BROADCAST_VOLUME(bhdr.getPointer());
int logicalDriveAffected = bvl.dbcv_unitmask;
short flag = bvl.dbcv_flags;
boolean isMediaNotPhysical = 0 != (flag & 1/*DBT.DBTF_MEDIA*/);
boolean isNet = 0 != (flag & 2/*DBT.DBTF_NET*/);
boolean isMediaNotPhysical = 0 != (flag & DBT.DBTF_MEDIA/*value is 1*/);
boolean isNet = 0 != (flag & DBT.DBTF_NET/*value is 2*/);
System.out.println(action);
int driveLetterIndex = 0;
while (logicalDriveAffected != 0) {
Expand Down

0 comments on commit a41d97d

Please sign in to comment.