Does this feature exsist?

Problems compiling? Don't understand the source code? Don't know how to code your feature? Post here.

Moderator: Moderators

Locked
WhosYourDaddy
Posts: 2
Joined: 2003-03-04 20:40
Location: Seattle, Washington
Contact:

Does this feature exsist?

Post by WhosYourDaddy » 2003-03-04 20:43

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.
John Milan
TeamDirection, Inc.

yilard
Posts: 66
Joined: 2003-01-11 06:04
Location: Slovakia

Post by yilard » 2003-03-05 03:49

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

sarf
Posts: 382
Joined: 2003-01-24 05:43
Location: Sweden
Contact:

Post by sarf » 2003-03-05 08:28

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.

qqzm
Posts: 47
Joined: 2003-01-23 07:08

Post by qqzm » 2003-03-06 04:32

/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...

WhosYourDaddy
Posts: 2
Joined: 2003-03-04 20:40
Location: Seattle, Washington
Contact:

Post by WhosYourDaddy » 2003-03-06 10:48

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?
John Milan
TeamDirection, Inc.

yilard
Posts: 66
Joined: 2003-01-11 06:04
Location: Slovakia

Post by yilard » 2003-03-06 10:59

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?
In the age of super-boredom/hype and mediocrity/celebrate relentlessness/menace to society --KMFDM

Locked