Their is a new class in .NET I really like called FileSystemWatcher. Basically, it lets you know whenever a file has been created, modifed or deleted. So, the question is, is DC++ using the .NET libraries at all? Or, does it somehow implement this feature?
Many Thanks. Neat Project.
Does this feature exsist?
Moderator: Moderators
-
- Posts: 2
- Joined: 2003-03-04 20:40
- Location: Seattle, Washington
- Contact:
Does this feature exsist?
John Milan
TeamDirection, Inc.
TeamDirection, Inc.
I don't know almost anything about .NET class libraries, but Win32 API offers this feature in generic WaitForSingleObject(), WaitForSingleObjectEx(), WaitForMultipleObjects() calls and other semaphore handling calls.
In the age of super-boredom/hype and mediocrity/celebrate relentlessness/menace to society --KMFDM
Yilard, I think he was talking about the feature that (among other apps) the Explorer uses to update its file/directory window when files/directories are created... but perhaps you did, too?
Anyhow, WhosYourDaddy, this functionality is not used by DC++ AFAIK (at least not in DC++ v0.232 which is the latest version of which I've looked through the source code) - it could have use of this, especially in the share directories (no need to force refresh of share every hour or any time for that matter).
Sarf
---
Frogs are my favorite vegetable.
Anyhow, WhosYourDaddy, this functionality is not used by DC++ AFAIK (at least not in DC++ v0.232 which is the latest version of which I've looked through the source code) - it could have use of this, especially in the share directories (no need to force refresh of share every hour or any time for that matter).
Sarf
---
Frogs are my favorite vegetable.
/me agrees with Yilard. this feature has existed in the Windows API long before .net was even a twinkle in Bill's eye.
The functions you need (look them up in the windows platform sdk on visual studio cds or on ms website):
FindFirstChangeNotification
WaitForSingleObjectEx
FindCloseChangeNotification
Oh, and make sure you do it in a separate thread...
And I don't know if DC++ uses it...
The functions you need (look them up in the windows platform sdk on visual studio cds or on ms website):
FindFirstChangeNotification
WaitForSingleObjectEx
FindCloseChangeNotification
Oh, and make sure you do it in a separate thread...
And I don't know if DC++ uses it...
-
- Posts: 2
- Joined: 2003-03-04 20:40
- Location: Seattle, Washington
- Contact:
Sarf had it right. MS exposed a bit more of their SMB notifications for developers, namely the ability to watch either files or directories for changes. Directory watching is particularly powerful as you'll be notified of any file or subdirectory changes. This is extremely useful for network share points and doing things like: exchanging files.
What I would be curious about is if the Samba guys have managed to duplicate the behavior. If so, possibly DC++ could have this ability too?
What I would be curious about is if the Samba guys have managed to duplicate the behavior. If so, possibly DC++ could have this ability too?
John Milan
TeamDirection, Inc.
TeamDirection, Inc.
Microsoft has not exposed any more of SMB notification capabilities with .NET than it was already available via windows api (calls I and qqzm have suggested). Class libraries are just lame encapsulation of those calls.
No DC++ is not using .NET libraries, and hopefully never will. But introducing such feature is possible as far as I know. For what should DC++ watch?
No DC++ is not using .NET libraries, and hopefully never will. But introducing such feature is possible as far as I know. For what should DC++ watch?
In the age of super-boredom/hype and mediocrity/celebrate relentlessness/menace to society --KMFDM