Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Using ReadDirectoryChangesW

Name: Anonymous 2006-11-11 17:11

ReadDirectoryChangesW reports any changes to a folder (file being renamed, removed, etc).

Sometimes it returns long filenames, sometimes short.
Sometimes it's impossible to convert between long and short filenames (notably when a file is deleted).
Sometimes the short filename for a file changes without actually touching that file at all.

Is it possible to actually use that function reliably?

Name: Anonymous 2006-11-11 17:49

Sorry.

Name: Anonymous 2006-11-12 4:56

www.linux.com
inotify

Name: Anonymous 2006-11-12 11:46

>>3
port2windows plox

Name: Anonymous 2006-11-12 12:03

>>1

Unfortunately not. This behaviour is apparently by design.

See http://support.microsoft.com/kb/290601 for details.

Name: Anonymous 2006-11-12 12:42

>>4
Kernel level.

Name: Anonymous 2006-11-12 13:53

Use the CLR. It has functions similar to inotify.

Name: Anonymous 2006-11-12 14:41

>>7

It uses ReadDirectoryChangesW internally to achieve this.

Name: Anonymous-san 2006-11-12 15:06

>>5

"That's nut a bug, it's a feature."

And people wonder why I say Windows was in the pool when we closed it for AIDS?

Name: Anonymous 2006-11-12 17:19

>>5
| An application would need to keep a cache of both short and long | file names to match them up when the notification is received.

Easy.

Name: Anonymous 2006-11-13 2:20

>>8

Not on Linux.

Name: Anonymous 2006-11-13 4:20

>>11

He's not using Linux, you fool.

Name: Anonymous 2006-11-13 7:22

>>12
I am, noob.

Name: Anonymous 2006-11-13 8:43

>>13

ReadDirectoryChangesW is a Win32 API function, shithead

Name: Anonymous 2006-11-13 10:33

>>14
Yeah, I know.

I use inotify.

Now GTFO.

Name: Anonymous 2006-11-13 11:47

>>10
Tried that. Noticed that windows sometimes changes the short file name. orz

Name: Anonymous 2006-11-13 11:53

>>15

Shut up. We weren't even talking about you and what you mess around with on Linux.

Name: Anonymous 2006-11-13 12:19

>>17
WTF?  If you aren't talking about me, then what are you talking about, HUH?

Name: Anonymous 2006-11-13 12:36

Just disable short filenames in the registry, it's also faster, takes less space for huge dirs, and who wants them in NTFS anyways.

Name: Anonymous 2006-11-13 14:47

>>19
can't expect every user to disable short filenames.

Name: Anonymous 2006-11-13 15:06 (sage)

microsoft should have disabled short filenames before they shipped windows 2000.

Name: Anonymous 2006-11-13 15:15

>>20
Let your installer do it for them, then.

Name: Anonymous 2006-11-13 15:46

>>18

The OP. Now FOAD.

Name: Anonymous 2006-11-13 16:44

>>23
No, you.

I am the goddamn king of /prog/.

Name: Anonymous 2006-11-14 6:43

>>19
Silently disable it for him ;)

Name: Anonymous 2006-11-14 13:05

Doesn't that just stop the short filename for new files?

Name: Anonymous 2006-11-14 14:37

>>26

Yes. We are stuck with C:\PROGRA~1\ forever.

Name: Anonymous 2006-11-14 15:17

Yes. W~1

Name: Anonymous 2006-11-15 6:03

bump

Name: Anonymous 2006-11-15 12:47

>>29
All hope is lost. There's nothing to add skipper.

Name: Anonymous 2006-11-15 22:05

>>30
Yes. W~2

Name: Anonymous 2006-11-15 22:09

>>28,31
YES.WEA

Name: Anonymous 2006-11-15 22:15 (sage)

Actually, I just tested it, and it becomes 'YES~1.WEA'.

Name: Anonymous 2006-11-16 21:52

>>33 Here
Actually, I just tested it again, and I'm an idiot.

Name: Anonymous 2006-11-16 22:58

Name: Anonymous 2011-02-04 17:29

Name: Sgt.Kabu훂kiman⠙䇪 2012-05-28 20:51

Bringing /prog/ back to its people
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List