Skip to content

Commit

Permalink
change encoding to UTF-8
Browse files Browse the repository at this point in the history
  • Loading branch information
yamahubuki committed Jan 12, 2020
1 parent 9b1740f commit e4ac265
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/ejectDrive.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import win32file
import re

deviceName=win32file.QueryDosDevice("E:")
deviceName=win32file.QueryDosDevice("I:")
deviceName=re.sub(r"\\Device\\([^\x00]+).*",r"\1",deviceName)

handle=win32file.CreateFile(
"\\\\.\\"+deviceName,
win32file.GENERIC_WRITE | win32file.GENERIC_READ,
0, #クローズするまで他からはOPENできない
None, #セキュリティ関連の構造体
win32file.OPEN_EXISTING, #デバイスのOPENはこれじゃないとダメ
0, #クローズするまで他からはOPENできない
None, #セキュリティ関連の構造体
win32file.OPEN_EXISTING, #デバイスのOPENはこれじゃないとダメ
0,
None)
print(handle)
Expand Down

0 comments on commit e4ac265

Please sign in to comment.