Hi
I tried the code as follows on my PC.

import os
import win32file
import win32con

path = "C:\\test"
FILE_LIST_DIRECTORY = 0x0001
BUFFER_SIZE = 2048

hDir = win32file.CreateFile (
        path,
        FILE_LIST_DIRECTORY,
        win32con.FILE_SHARE_READ | win32con.FILE_SHARE_WRITE,
        None,
        win32con.OPEN_EXISTING,
        win32con.FILE_FLAG_BACKUP_SEMANTICS,
        None
    )
    
print hDir

results = win32file.ReadDirectoryChangesW (
            hDir,
            BUFFER_SIZE,
            True,
            win32con.FILE_NOTIFY_CHANGE_LAST_WRITE,
            None,
            None
        )


my platform is Windows XP SP3,  and the version of python is 2.6.6, the version 
of pywin32 is pywin32-216.win32-py2.6.exe.

I have tried plenty of exmples on the Internet, by got almost the same error:
"pywintypes.error: (87, 'ReadDirectoryChangesW', 
'\xb2\xce\xca\xfd\xb2\xbb\xd5\xfd\xc8\xb7\xa1\xa3')" which indicates that 
parameter incorrect , I really be troubled!~

Is there anyone voluntary to give some help? Thanks a lot lot!

2012-01-10



wangsuyi640: A simple lover of python
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to