I am not sure if this is the right forum to ask this question. But would
appreciate any help for the same.
I am writing an application that does ShareEnumeration. I need to use all
the details(attributes, ACL’s, Permissions,Type etc.) of the File/folder
that has been enumerated. I understand that this can be achieved using
IShellfolder interface and using NetAPI’s with the FindFirstFile,
FindNextFile.
I wanted to know which would be the best way to go about implementing the
same. Using IShellfolder looks quicker and code path is short, but then
will I compromise on any feature flexibility in the future by using COM
for the same. Does IShellFolder and the various methods supported by this
interface provide all the information needed for a file object ?
Similarly in the Case of NetShareEnum/FindFirstFile/FindNext File what
would be the advantages/disadvantages.
Essentially this sounds like a conflict between WIN32 and COM. From the
NTFS perspective what API’s are closer to the FS ?
Being as hardcore as I am, I stay away from COM as much as possible
(it’s great for IPC, sucks for almost anything else). For your purposes
I’d use the Win32 APIs - yes, they are lower-level than COM, and being
lower-level and well-documented I’d place less chance on them changing
behavior than on IShellFolder.
Nick Ryan
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Nikhil
Sent: Wednesday, April 30, 2003 9:04 PM
To: NT Developers Interest List
Subject: [ntdev] IShellFolder Vs NetShareEnum with
FindFirstFile, FindNextFile
Hi,
I am not sure if this is the right forum to ask this
question. But would appreciate any help for the same.
I am writing an application that does ShareEnumeration. I
need to use all the details(attributes, ACL’s,
Permissions,Type etc.) of the File/folder that has been
enumerated. I understand that this can be achieved using
IShellfolder interface and using NetAPI’s with the
FindFirstFile, FindNextFile.
I wanted to know which would be the best way to go about
implementing the same. Using IShellfolder looks quicker and
code path is short, but then will I compromise on any feature
flexibility in the future by using COM for the same. Does
IShellFolder and the various methods supported by this
interface provide all the information needed for a file object ?
Similarly in the Case of NetShareEnum/FindFirstFile/FindNext
File what would be the advantages/disadvantages.
Essentially this sounds like a conflict between WIN32 and
COM. From the NTFS perspective what API’s are closer to the FS ?
Typically I also prefer using Win32 API’s as I feel that I have more
control of the codepath.
But given the fact I had numerable choices I was trying to understand what
could be a better choice. And looks like Win32 is the way to go, Unless
some COM “gurus” jump in and have to say something else.