DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Page 3 of 4 FirstFirst 1234 LastLast
Results 31 to 45 of 55

Thread: Determining a file extension

  1. #31
    Rob Teixeira Guest

    Re: Determining a file extension


    Ouch! That's like 80 function or so. You're going to need a whole magazine
    for that article

    Still, I'd be interested in seeing a good utility library, since there are
    some things I would have liked to see in shlwapi that aren't there.

    -Rob

    "L.J. Johnson" <LJJohnson@SlightlyTiltedSoftware.com> wrote:
    >I have mixed feelings, but I've used them before <shame>.
    >
    >Might be interesting to wrapper *all* the functions in VB/API code as an
    >stand-alone dll (which would be faster, to boot). Think it's worth wasting
    >an article on?
    >
    >--
    >L.J. Johnson, Slightly Tilted Software
    >Microsoft MVP (Visual Basic)
    >LJJohnson@SlightlyTiltedSoftware.com or LJJohnson@mvps.org
    ><http://www.SlightlyTiltedSoftware.com>
    >Ask The NT Pro at <http://www.devx.com/gethelp>
    >
    >
    >



  2. #32
    L.J. Johnson Guest

    Re: Determining a file extension

    Karl,

    > Depends what you're up to. In most simple cases, that's very true. The

    problems
    > occur when folks write these as "generic" routines, then try to scale them

    to the
    > trouble cases. The bottom line is, there can easily be *two orders* of

    magnitude
    > difference, based on the choices made:
    >
    > Might as well just invest the time to do it right the first time, then

    reap the
    > benefits from there on out.


    I have mixed feelings, but I've used them before <shame>.

    Might be interesting to wrapper *all* the functions in VB/API code as an
    stand-alone dll (which would be faster, to boot). Think it's worth wasting
    an article on?

    --
    L.J. Johnson, Slightly Tilted Software
    Microsoft MVP (Visual Basic)
    LJJohnson@SlightlyTiltedSoftware.com or LJJohnson@mvps.org
    <http://www.SlightlyTiltedSoftware.com>
    Ask The NT Pro at <http://www.devx.com/gethelp>




  3. #33
    L.J. Johnson Guest

    Re: Determining a file extension

    Karl,

    > Depends what you're up to. In most simple cases, that's very true. The

    problems
    > occur when folks write these as "generic" routines, then try to scale them

    to the
    > trouble cases. The bottom line is, there can easily be *two orders* of

    magnitude
    > difference, based on the choices made:
    >
    > Might as well just invest the time to do it right the first time, then

    reap the
    > benefits from there on out.


    I have mixed feelings, but I've used them before <shame>.

    Might be interesting to wrapper *all* the functions in VB/API code as an
    stand-alone dll (which would be faster, to boot). Think it's worth wasting
    an article on?

    --
    L.J. Johnson, Slightly Tilted Software
    Microsoft MVP (Visual Basic)
    LJJohnson@SlightlyTiltedSoftware.com or LJJohnson@mvps.org
    <http://www.SlightlyTiltedSoftware.com>
    Ask The NT Pro at <http://www.devx.com/gethelp>




  4. #34
    Karl E. Peterson Guest

    Re: Determining a file extension

    Hi Rob --

    > Hey! Scaling out...
    > Careful Karl, that almost sounds like pro-.NET logic! What about the "little
    > guy" with his "real" VB app? <g>


    Ah, but you see, that's the beauty of Classic MSBasic. It "scales" to millions of
    iterations just fine, as long as the architect is careful. And, millions of little
    guys have been using it for just that for going on two+ decades now, despite
    Microsoft's best efforts to thwart them in some cases. Too real, huh?

    Later... Karl


    > "Karl E. Peterson" <karl@mvps.org> wrote:
    > >
    > >Depends what you're up to. In most simple cases, that's very true. The

    > problems
    > >occur when folks write these as "generic" routines, then try to scale them

    > to the
    > >trouble cases. The bottom line is, there can easily be *two orders* of

    > magnitude
    > >difference, based on the choices made:
    > >
    > > http://www.mvps.org/vbnet/code/filea...apicompare.htm
    > >
    > >Might as well just invest the time to do it right the first time, then reap

    > the
    > >benefits from there on out.
    > >
    > >Later... Karl
    > >--
    > >http://www.mvps.org/vb
    > >
    > >

    >



  5. #35
    Karl E. Peterson Guest

    Re: Determining a file extension

    Hi Rob --

    > Hey! Scaling out...
    > Careful Karl, that almost sounds like pro-.NET logic! What about the "little
    > guy" with his "real" VB app? <g>


    Ah, but you see, that's the beauty of Classic MSBasic. It "scales" to millions of
    iterations just fine, as long as the architect is careful. And, millions of little
    guys have been using it for just that for going on two+ decades now, despite
    Microsoft's best efforts to thwart them in some cases. Too real, huh?

    Later... Karl


    > "Karl E. Peterson" <karl@mvps.org> wrote:
    > >
    > >Depends what you're up to. In most simple cases, that's very true. The

    > problems
    > >occur when folks write these as "generic" routines, then try to scale them

    > to the
    > >trouble cases. The bottom line is, there can easily be *two orders* of

    > magnitude
    > >difference, based on the choices made:
    > >
    > > http://www.mvps.org/vbnet/code/filea...apicompare.htm
    > >
    > >Might as well just invest the time to do it right the first time, then reap

    > the
    > >benefits from there on out.
    > >
    > >Later... Karl
    > >--
    > >http://www.mvps.org/vb
    > >
    > >

    >



  6. #36
    Karl E. Peterson Guest

    Re: Determining a file extension

    Hi L.J. --

    > > Might as well just invest the time to do it right the first time, then
    > > reap the benefits from there on out.

    >
    > I have mixed feelings, but I've used them before <shame>.


    Me too, and that taught me the lesson I needed, lemme tell ya! ;-)

    > Might be interesting to wrapper *all* the functions in VB/API code as an
    > stand-alone dll (which would be faster, to boot). Think it's worth wasting
    > an article on?


    Very cool idea. Same premise we based CCRP on, if you recall. Done right, it could
    extend to half a year's worth of articles. <g>

    Actually, might make a really fun little open sores type of project! :-)

    Later... Karl
    --
    http://www.mvps.org/vb



  7. #37
    Karl E. Peterson Guest

    Re: Determining a file extension

    Hi L.J. --

    > > Might as well just invest the time to do it right the first time, then
    > > reap the benefits from there on out.

    >
    > I have mixed feelings, but I've used them before <shame>.


    Me too, and that taught me the lesson I needed, lemme tell ya! ;-)

    > Might be interesting to wrapper *all* the functions in VB/API code as an
    > stand-alone dll (which would be faster, to boot). Think it's worth wasting
    > an article on?


    Very cool idea. Same premise we based CCRP on, if you recall. Done right, it could
    extend to half a year's worth of articles. <g>

    Actually, might make a really fun little open sores type of project! :-)

    Later... Karl
    --
    http://www.mvps.org/vb



  8. #38
    L.J. Johnson Guest

    Re: Determining a file extension

    Rob,

    > Ouch! That's like 80 function or so. You're going to need a whole magazine
    > for that article


    Yea, but a number of them are pretty trivial -- mainly checking for validity
    and parsing text. I'd have to look at them one-by-one to determine how
    doable (in a reasonable timeframe) it is, but if it looks like I can get
    all/most of them, I'll submit to Patrick.

    > Still, I'd be interested in seeing a good utility library, since there are
    > some things I would have liked to see in shlwapi that aren't there.


    Listing of such features?

    --
    L.J. Johnson, Slightly Tilted Software
    Microsoft MVP (Visual Basic)
    LJJohnson@SlightlyTiltedSoftware.com or LJJohnson@mvps.org
    <http://www.SlightlyTiltedSoftware.com>
    Ask The NT Pro at <http://www.devx.com/gethelp>




  9. #39
    L.J. Johnson Guest

    Re: Determining a file extension

    Rob,

    > Ouch! That's like 80 function or so. You're going to need a whole magazine
    > for that article


    Yea, but a number of them are pretty trivial -- mainly checking for validity
    and parsing text. I'd have to look at them one-by-one to determine how
    doable (in a reasonable timeframe) it is, but if it looks like I can get
    all/most of them, I'll submit to Patrick.

    > Still, I'd be interested in seeing a good utility library, since there are
    > some things I would have liked to see in shlwapi that aren't there.


    Listing of such features?

    --
    L.J. Johnson, Slightly Tilted Software
    Microsoft MVP (Visual Basic)
    LJJohnson@SlightlyTiltedSoftware.com or LJJohnson@mvps.org
    <http://www.SlightlyTiltedSoftware.com>
    Ask The NT Pro at <http://www.devx.com/gethelp>




  10. #40
    Mattias Sjögren Guest

    Re: Determining a file extension

    Karl,

    >Could be all that pointless conversion from->to->from Unicode, huh?


    IIRC, the Shlwapi functions are available in ANSI and Unicode versions
    on all platforms, so there's no reason to go through that process.


    Mattias

    ====================================
    Mattias Sjögren - mattias @ mvps.org

  11. #41
    Mattias Sjögren Guest

    Re: Determining a file extension

    Karl,

    >Could be all that pointless conversion from->to->from Unicode, huh?


    IIRC, the Shlwapi functions are available in ANSI and Unicode versions
    on all platforms, so there's no reason to go through that process.


    Mattias

    ====================================
    Mattias Sjögren - mattias @ mvps.org

  12. #42
    Karl E. Peterson Guest

    Re: Determining a file extension

    Hi Mattias --

    > >Could be all that pointless conversion from->to->from Unicode, huh?

    >
    > IIRC, the Shlwapi functions are available in ANSI and Unicode versions
    > on all platforms, so there's no reason to go through that process.


    That's right! I'd all but forgotten that. Good point. And certainly a way to speed
    them up considerably.

    Still, looking at the docs, this isn't clearly spelled out, that I can see? Wish I
    remembered where I originally saw this... Ah, QuickView confirms! Yep. :-)

    Thanks... Karl
    --
    http://www.mvps.org/vb



  13. #43
    Karl E. Peterson Guest

    Re: Determining a file extension

    Hi Mattias --

    > >Could be all that pointless conversion from->to->from Unicode, huh?

    >
    > IIRC, the Shlwapi functions are available in ANSI and Unicode versions
    > on all platforms, so there's no reason to go through that process.


    That's right! I'd all but forgotten that. Good point. And certainly a way to speed
    them up considerably.

    Still, looking at the docs, this isn't clearly spelled out, that I can see? Wish I
    remembered where I originally saw this... Ah, QuickView confirms! Yep. :-)

    Thanks... Karl
    --
    http://www.mvps.org/vb



  14. #44
    Michael Shutt Guest

    Re: Determining a file extension

    Slowest in terms of CPU cycles, yes. However, probably the fastest in terms
    of development time. Also more reliable than reinventing the wheel
    yourself. There's always a trade off.

    --
    Michael Shutt

    Please respond to newsgroup as I will not return direct emails.

    "Karl E. Peterson" <karl@mvps.org> wrote in message
    news:3b66e3c8$1@news.devx.com...
    > And that's probably the slowest of all possible methods...
    > --
    > http://www.mvps.org/vb
    >
    > "Michael Shutt" <mshutt_nospam@mediaone.net> wrote in message
    > news:3b668a41@news.devx.com...
    > > The other suggestions will work, but you may want to check out the
    > > Scripting.FileSystemObject also. Add a reference to "Microsoft

    Scripting
    > > Runtime" to your project. The file system object has a handful of

    functions
    > > for extracting parts of a path or constructing a full path based on the
    > > parts.
    > >
    > > --
    > > Michael Shutt
    > >
    > > Please respond to newsgroup as I will not return direct emails.
    > >
    > > "Mike Kraemer" <mkraemer@91expresslanes.com> wrote in message
    > > news:3b61d8a5$1@news.devx.com...
    > > >
    > > > Hi Everyone!
    > > > I'm building a routine that builds the path to image files that are

    > > retreive
    > > > for user reviews. The files may be either file.jpg or file.tif. Any

    > > recomendations
    > > > as to which call if any to use?
    > > > Thanks in advance for your assistance.
    > > >
    > > > Mike

    > >
    > >

    >




  15. #45
    Michael Shutt Guest

    Re: Determining a file extension

    Slowest in terms of CPU cycles, yes. However, probably the fastest in terms
    of development time. Also more reliable than reinventing the wheel
    yourself. There's always a trade off.

    --
    Michael Shutt

    Please respond to newsgroup as I will not return direct emails.

    "Karl E. Peterson" <karl@mvps.org> wrote in message
    news:3b66e3c8$1@news.devx.com...
    > And that's probably the slowest of all possible methods...
    > --
    > http://www.mvps.org/vb
    >
    > "Michael Shutt" <mshutt_nospam@mediaone.net> wrote in message
    > news:3b668a41@news.devx.com...
    > > The other suggestions will work, but you may want to check out the
    > > Scripting.FileSystemObject also. Add a reference to "Microsoft

    Scripting
    > > Runtime" to your project. The file system object has a handful of

    functions
    > > for extracting parts of a path or constructing a full path based on the
    > > parts.
    > >
    > > --
    > > Michael Shutt
    > >
    > > Please respond to newsgroup as I will not return direct emails.
    > >
    > > "Mike Kraemer" <mkraemer@91expresslanes.com> wrote in message
    > > news:3b61d8a5$1@news.devx.com...
    > > >
    > > > Hi Everyone!
    > > > I'm building a routine that builds the path to image files that are

    > > retreive
    > > > for user reviews. The files may be either file.jpg or file.tif. Any

    > > recomendations
    > > > as to which call if any to use?
    > > > Thanks in advance for your assistance.
    > > >
    > > > Mike

    > >
    > >

    >




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center