473,395 Members | 1,554 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

ReadDirectoryChangesW (windows)

Hi all,

I am new to win32 programming and was wondring if anyone can enlighten me on a question I have:

there is a win32file function I would like to use - ReadDirectoryChangesW() and its parameters are, according to
below:

----
ReadDirectoryChangesW(handle, size, bWatchSubtree, dwNotifyFilter, overlapped)

retrieves information describing the changes occurring within a directory.

Parameters:

handle : int
Handle to the directory to be monitored. This directory must be opened with the FILE_LIST_DIRECTORY access right.

size : int
Size of the buffer to allocate for the results.

bWatchSubtree : int
Specifies whether the ReadDirectoryChangesW function will monitor the directory or the directory tree. If TRUE is
specified, the function monitors the directory tree rooted at the specified directory. If FALSE is specified, the
function monitors only the directory specified by the hDirectory parameter.

dwNotifyFilter : int
Specifies filter criteria the function checks to determine if the wait operation has completed. This parameter can be
one or more of the FILE_NOTIFY_CHANGE_* values.

overlapped=None : PyOVERLAPPED
Must be None
------

I would like to use this function asynchronously to open a directory using the FILE_FLAG_OVERLAPPED flag so that I can
later on wait for a change to be signalled and so that I can use this in a service waiting with e.g.
WaitForSingleObject().

I don't have much experience using pywin32 and I am puzzled by the last line "Must be None". Does this mean
asynchronous access is not supported? Or am I ready to actually RTFM if someone can politely point me to one? :)

Thanks,
Ognen
Jul 18 '05 #1
2 3242
Ognen Duzlevski wrote:
Hi all,

I am new to win32 programming and was wondring if anyone can enlighten me on a question I have:

there is a win32file function I would like to use - ReadDirectoryChangesW() and its parameters are, according to
below:

----
ReadDirectoryChangesW(handle, size, bWatchSubtree, dwNotifyFilter, overlapped)

retrieves information describing the changes occurring within a directory.

Parameters:

handle : int
Handle to the directory to be monitored. This directory must be opened with the FILE_LIST_DIRECTORY access right.

size : int
Size of the buffer to allocate for the results.

bWatchSubtree : int
Specifies whether the ReadDirectoryChangesW function will monitor the directory or the directory tree. If TRUE is
specified, the function monitors the directory tree rooted at the specified directory. If FALSE is specified, the
function monitors only the directory specified by the hDirectory parameter.

dwNotifyFilter : int
Specifies filter criteria the function checks to determine if the wait operation has completed. This parameter can be
one or more of the FILE_NOTIFY_CHANGE_* values.

overlapped=None : PyOVERLAPPED
Must be None
------

I would like to use this function asynchronously to open a directory using the FILE_FLAG_OVERLAPPED flag so that I can
later on wait for a change to be signalled and so that I can use this in a service waiting with e.g.
WaitForSingleObject().

I don't have much experience using pywin32 and I am puzzled by the last line "Must be None". Does this mean
asynchronous access is not supported? Or am I ready to actually RTFM if someone can politely point me to one? :)


I'm afraid it is not yet supported. Patches gratefully accepted (and I
am willing to help) :)

Mark.

Jul 18 '05 #2
Mark Hammond <mh******@skippinet.com.au> wrote:
I don't have much experience using pywin32 and I am puzzled by the last line "Must be None". Does this mean
asynchronous access is not supported? Or am I ready to actually RTFM if someone can politely point me to one? :)
I'm afraid it is not yet supported. Patches gratefully accepted (and I
am willing to help) :)


I am willing to work on this if I am pointed in the right direction :). I checked out the code in win32file.i and it
suggests to look at ReadFile(). I think I can come up with something.
Ognen
Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Ken Lindner | last post by:
I have a need to become familiar with SQL Server 2000 for work. Needless to say I am new to SQL Server any version, but not IT in general. My employer has provided me with the SQL Server 2000...
1
by: Tanuki | last post by:
Hi All: I am currently writing a VC++ 6 program to detect file addition to a specific directory. I am using ReadDirectoryChangesW to detect the changes and I am running the detection mechanism...
1
by: Scott Davies | last post by:
Hi, I'm looking for some help on a small program that I'm trying to develop in VB.NET. I'm having trouble getting the code that I've written to work, can anyone shed some light as to where I'm...
0
by: Scott Davies | last post by:
Hi, I'm looking for some help on a small program that I'm trying to develop in VB.NET. The program I'm trying to develop needs to be able to do the following: - Select remote server -...
4
by: Rod Gill | last post by:
Hi, I have a form that when opened in the designer appears of the screen. The form selector can't be dragged (or resized) and if I scroll right and down to centralise it the form simply jumps...
2
by: sambo251 | last post by:
After running a few updates I get this very annoying "Windows Installer" error #1706 that will ne go away! It keeps saying that it cannot find the file "instantsharedevices.msi", that it is on...
1
by: mfunkmann | last post by:
Hi, I recently got an error and I don't know how to fix it: Error 1 'System.Data.DataColumn' does not contain a definition for 'Windows' C:\c#\CsharpPRO\Form1.Designer.cs 304 77 CsharpPRO I...
0
AmberJain
by: AmberJain | last post by:
Windows Autorun FAQs: List of autostart locations Linked from the Original article- "Windows Autorun FAQs: Description". Que: Can you list all the autostart locations for windows? Ans: Here is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.