Re: API vs. FSO

From: Joe (Joe_at_discussions.microsoft.com)
Date: 09/28/04


Date: Tue, 28 Sep 2004 12:49:14 -0700

Ken, Thanks for your reply. Please see below.

"Ken Halter" wrote:
>
>
> Joe wrote:
>
> > Would some of you please explain why you prefer the Windows API
> > drives/directories/files functions to the FSO and its associated objects?
> > Other than performance, why choose one over the other?
>
> The only benefit the FSO has is a decent object model. Other than that,
> there's zero reason to use it. VB's runtime has everything you need to
> access files of any type built right in (not true with FSO).

By VB's runtime, do you mean the API functions or functions like Dir, etc?
I don't know enough about VB's runtime to understand this statement.

>
> > Personally, I prefer the API calls because somewhere in my mind, I believe
> > that they are more robust. I don't actually know if this is true. Is it?
>
> FSO's slow....
>
> Performance Comparison - FSO vs. API
> http://vbnet.mvps.org/index.html?code/fileapi/fsoapicompare.htm
>
> > I've also noticed that some are rabidly contre the Scripting Objects (FSO
> > and Dictionary). Again, would you please explain why?
>
> If, by contre, you mean dislike, there are several reasons. First, it's
> scripting (=slow), second, using the API or VB's built in file support,
> there's no need to distribute an additional library... third.. that
> library stands a good chance of breaking someone elses PC... fourth,
> some virus scanners hate scripting of any kind.

Scripting, as opposed to compiled? What engibe executes the scripted code
for the FSOs?

VB's built in file support? Does this include Dir, ChDir, etc?

How does the library stand a good chance of breaking someone elses PC?

Thanks, Ken.

>
> > TIA,
>
> --
> Ken Halter - MS-MVP-VB - http://www.vbsight.com
> Please keep all discussions in the groups..
>



Relevant Pages

  • Re: Rename all files in a folder
    ... Although API, FSO, Windows Scripting won't do me any good on my home MacWord ... Is there a way to call a Perl script and use regular expressions with VBA? ...
    (microsoft.public.word.vba.general)
  • Re: Rename all files in a folder
    ... Although API, FSO, Windows Scripting won't do me any good on my home MacWord ... Is there a way to call a Perl script and use regular expressions with VBA? ...
    (microsoft.public.word.vba.general)
  • Re: Why !deadlock command is not functional ?
    ... b9ede000 b9f3f000 tcpip (pdb symbols) ... f74c7000 f74d4000 PCIIDEX PCIIDEX.SYS ...
    (microsoft.public.development.device.drivers)
  • Re: "scrrun.dll" not compatible in different languages?
    ... Any OS that supports scripting must be properly locked down or the scripting ... some features in FSO that are nearly impossible to ... The fact that VB 6 doesn't support ... The fact that there is no way to write a decent language translator from VB ...
    (microsoft.public.vb.general.discussion)
  • Re: File.datecreated doesnt change
    ... I have a VBScript book from 1997 that presents VBS as ... being just a new language for webpage scripting. ... So at that point there was no CreateObject, no FileSystemObject, ... The O'Reilly VB6 reference book includes all of the FSO ...
    (microsoft.public.scripting.wsh)