SPONSORS:






User Tag List

Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    Aug 2002
    Location
    Durham, NC USA
    Posts
    60
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Binary file writing

    I looked over the internet and the message boards for a way to write a binary file, but I couldn't find anything. I did find a DLL extension (from 1999!) by Christophe Lefevre, and I was able to modify it to successfully write a UUEncoded binary file, using data stored in a LIST OF STRING.

    I've seen a lot of questions about this, so I figured I'd post my function for the good of the community. The script, with two sample UUEncoded files included, is attached. It should be fairly functional, but I'll be happy to fix bugs etc. as needed. As a note: all the functions in the script are most likely necessary; you might want to just include the file if you intend to use it.

    As you will probably be able to tell, one function of this is so I can encapsulate a bitmap (for the comparebitmap () function) in my test script. I'm sure everyone will have a different (or no) use.

    Google for uuencode if you need a program to create your lists. I use DOS programs, but PowerArchiver (at least) also supports UUE.

    This also includes the fabled BOStringIntoListOfString () function, which I recreated from air. It might be something like what Christophe originally wrote.

    Best of luck!

    -Timothy Crone
    Lvl7 Systems, Inc.
    Cary, NC


    [This message has been edited by tdcrone (edited 09-12-2002).]

    [This message has been edited by tdcrone (edited 09-12-2002).]
    --
    Tim Crone
    Broadcom

  2. #2
    Member
    Join Date
    Aug 2002
    Location
    Durham, NC USA
    Posts
    60
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Binary file writing

    Shortly after I posted this, it was pointed out to me that it didn't work on '98. I fixed it, then went out of town.

    Sorry for the trouble, and for the posting delay.

    The first file included sample code to run the routine; this one is merely the important functions to get something uudecoded, and should serve as a drop-in replacement for the earlier routines.

    Anyway, this has been tested on '98, NT4, 2K, XP, and .NET Server Enterprise.

    Timothy Crone
    Lvl7 Systems, Inc.
    Cary NC
    --
    Tim Crone
    Broadcom

  3. #3
    Member
    Join Date
    Aug 2002
    Location
    Durham, NC USA
    Posts
    60
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Binary file writing

    Finally... supports binary file read as well!

    Incredibly slow functions support uudecode and uuencode on native Windows platforms using Silktest. UUEncode output matches that of the unix version, uudecode seems quite happy with it. (The slowness is on account of Silktest's unique handling of \0.)

    No DLLs are required other than those required for Windows. No special setup need be made.

    This DLL also contains the ListSearch function, so it should be fully self-contained.

    I have tested UUDecode on a variety of Windows versions; UUEncode has only been tested on XP to date.

    The function UUEncode returns a LIST OF STRING containing a (UUEncoded) binary file. The function UUDecode writes a LIST OF STRING to a (UUDecoded) binary file.

    -TC


    ------------------
    --
    Tim Crone
    Broadcom

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 12:46 AM.

Copyright BetaSoft Inc.