Contents
 	Wincode HELP Contents

 What is a Wincode?

 Features!!!

 Requirements

 Files

 Wincode Setup

 Configuring and Using Wincode

 SMART Decoding

 Contacting the Author

 Disclaimer

 Version History

 Future Prospects


What is Wincode?
Wincode: a uucoder for Windows

(C) Snappy_Inc. (1993)

written by G.H. Silva

***PLEASE DISTRIBUTE PROGRAM FREELY WITH ALL FILES INTACT***

Essentially, a uu-coder program converts 7-bit ASCII files to 8-bit BINARY files (EXE, COM, GIF files, etc.) and vice versa. This encoding/decoding process allows you to send and receive binary files via e-mail (or any other ascii-based communications system). The usefulness of such a program can be seen in any 'BINARIES' NewsGroup (have you been wondering how to use those funny scrambled files?). Users are able to exchange ANY type of program through standard ASCII e-mail. I first encountered uu-coding on a UNIX based system but soon found that a PC Windows version would be very useful.

 portions of this program are copyright (C) 1991,1993 Borland

 Windows is a trademark of Microsoft Corporation

 GIF is a service mark of CompuServe Incorporated


Features
Features!!!

 A Full Featured Windows 3.1 Program written in TPW 1.5

 Drag and Drop Encoding/Decoding !!!  - Use your favorite Windows file manager to choose the files you want and drop them on the Wincode window or icon. (EASY batch file processing!)

 SMART Decoding - supports decoding of single files, multi-part files, single files containing multi-part files, etc. Also incorporates many error-bypass options such as Space-Replace and the ability to correct improper output filenames when decoding.

 Set the Following Encoding Features:

 Bytes per File - you can encode into one large file or into several files of any length you chose (for e-mail system that restrict file size) --- there's even a BYTES-to-LINES-IN-FILE conversion message!

 Encoding Mode (option can be set, but Wincode supports mode 644)

 File Extension - you can set your own extensions for encoded files

 File Directory - this is the directory were encoded files are created

 File Headers - by default, the program encodes files with headers which include section numbers and a file name--- this option can be turned on/off

 Multiple/Single File - you can either encode into one large file or many small files of desired length (see Lines Per File option).

 Set the Following Decoding Features:

 File Extension - you can set your own extensions for decoded files

 Dump Directory - this is a directory in which encoded files are 'dumped' after being decoded.

 File Directory - this is the directory were decoded files are created

 Run Decoded Files- you can set Wincode to automatically execute files that have just been decoded.

 Error Checking- allows you to set Error-checking on (for files which decode improperly) or off (to speed up Wincode).

 Create Report File- you can set this to create Report files for both encoding and decoding of files. Report files contain essential file processing information as well as output file error listings.

 The Start As Icon option can be set so that Wincode will start as an Icon when it is first initialized.

 Program Working Directory can also be set (program defaults to this directory upon start-up).

 Wincode can accept a Command Line parameter when starting. You can now ASSOCIATE (in File Manager) Wincode with an extension (such as UUE) and start Wincode by double-clicking the associated file.

NOTE: Wincode is now a 'single-instance' application. If you try to re-start it, the first 'instance' will become the top window.


Requirements
Requirements:

 IBM compatible running DOS 3.1 or higher with a 286 or higher processor

 Windows 3.1 running in standard or enhanced mode with at least 2MB memory (the amount of memory available [up to 2MB] determines the size of the file that can be coded)-if you need to en/de-code a file larger than 2MB, contact me.

 119K of disk space (~86K for Wincode, ~33K for the HELP file)


Files Included
Files Included with Wincode:

 WINCODE.EXE [image] the executable program

 WINCODE.HLP [image] the help file

 README.TXT [image] a 'read me first' plain text file


Wincode Setup
Setting Up Wincode...

Getting started is really simple. First, you need to make sure that your WINDOWS directory is in your PATH statement (standard procedure). Then, copy the files WINCODE.EXE and WINCODE.HLP to an appropriate directory...I use C:\UTIL\WINCODE...

To make a Wincode Icon:

(1) choose FILE|NEW from the PROGRAM Manager menu

(2) select Program Item and hit OK

(3) for Description type in:     Wincode

(4) for Command Line select Browse and highlight WINCODE.EXE or type in  the full path name of where the file is located...i.e. C:\UTIL\WINCODE\WINCODE.EXE

(5) select OK and the Wincode Icon will appear in the group you selected

(6) to run Wincode, double-click on its icon...

To run Wincode from the Windows Command Line:

(1) choose FILE|RUN from the PROGRAM Manager menu

(2) type in the full path of where the program is located...

Wincode starts with its default settings (choose OPTIONS|CONFIGURATION to see this)...It will create a WINCODE.INI file in your WINDOWS directory as soon as you select SAVE in the CONFIGURATION dialog box...


Configuring Wincode
Configuring and Using Wincode

The following is Wincode's menu-layout. Click on each GREEN menu choice for a detailed explanation of it's function:

File Menu

Encode

Decode

Exit

Options Menu

Encode...

Bytes per File

Mode

File Extension

Directory

Section Headers

Single File

Decode...

File Extension

Dump Directory

Directory

Run Decoded File

Error Checking

Create Report File

Start As Icon

Working Directory

Configuration

Reload from Disk

Help

Contents

About


Encode

Choose this to uu-encode a single file. An appropriate FILE OPEN dialog appears which allows you to select a file for encoding. The default start-up directory for selecting files is set with the  OPTIONS|WORKING DIRECTORY menu choice. When you select the file you want, choose OK and Wincode will begin processing the file as specified in your active CONFIGURATION. Encoded files are created in the directory specified under the 'Encode Info' section of the active CONFIGURATION (see below). Encoded-file names are created in the following manner:

 Wincode takes the name of the file being encoded and appends a number (starting with one (1) and going to ninety-nine (99)). If Wincode 'predicts' the input file will be encoded into more than 9 files, it will append an '01', '02', etc; otherwise, it will use '1','2', etc (this allows proper ordering of files in the DOS directory). Wincode will truncate the input-file-name so that it does not exceed the DOS eight-character limit. If you need to encode a file into more than 99 parts (wow!) drop me a line...

When Wincode is Encoding a file, it will display an information Window which details the input file name, output file name and the percentage of the input file Wincode has encoded. The main menu will change to display  Stop and Quit options.

NOTE: Since displaying these windows requires System resources, Wincode will work considerably faster in its iconic state.


Decode

Choose this to uu-decode a single (including multi-part) file. An appropriate FILE OPEN dialog appears which allows you to select a file for decoding. The default start-up directory for selecting files is set with the OPTIONS|WORKING DIRECTORY menu choice. When you select the file you want, choose OK and Wincode will begin processing the file as specified in your active CONFIGURATION. Decoded files are created in the directory specified under the 'Decode Info' section of the active CONFIGURATION (see below).

To decode a multi-part file, select the first file in the series and Wincode will open the rest of the files as it needs them. Wincode interprets multi-part files as such:

 If the input file does not contain the appropriate 'end' message to stop decoding, Wincode will continue reading the file searching for the rest of the encoded text. If nothing is found, the program checks to see if the input-file name ends with a 'number' (this can be ANY number: filename3270.uue is as valid as filename1.uue, etc). Wincode searches the current directory for the next file in sequence by incrementing the 'number' in the original input file.

Wincode will ALWAYS read a file from first-to-last byte. It can decode MULTIPLE files concatenated in a single file: the files can be pieces of a single file or multiple files. The only requirement is that the files be IN ORDER within the input file.

When Wincode is Decoding a file, it will display an information Window which details the input file name, output file name and the percentage of the input file Wincode has scanned through and/or decoded. The main menu will change to display  Stop and Quit options.

NOTE: Since displaying these windows requires System resources, Wincode will work considerably faster in its iconic state.

See SMART Decoding.


Stop

This option appears in the main menu when Wincode is either encoding or decoding a file. By choosing Stop, you terminate the en/de-coding of the current file.

If Wincode is encoding, it will finish the file it is currently on and a) move on to the next file to encode if this is a 'batch' process (i.e  Drag and Drop); or b) stop everything.

If Wincode is decoding, it will stop decoding the current file but will still search through the rest of the input file for more encoded files. If this is a 'batch' process, Wincode will continue to the next file when it finishes scanning.

As a precaution, Wincode will prompt for confirmation before stopping the current process.


Quit

This option appears in the main menu when Wincode is either encoding or decoding a file. By choosing Quit, you terminate the en/de-coding of the current file and all successive files if you are running a batch job.

As a precaution, Wincode will prompt for confirmation before quitting all jobs.


Exit

Choose this to end the program. If your CONFIGURATION has changed, a dialog box will ask you whether you wish to save these settings or not.


Bytes per File

This allows you to set the maximum number of ENCODED bytes per file.

I stress ENCODED because this does not include Section Headers or any other headers or trailers created by the encoding process (you need a 'begin-end' pair, etc). When you select this option, a dialog appears which displays the 'current' setting and a caption which translates (approx.) the number-of-bytes-per-file into lines-per-file (its final size). This caption is updated each time you change this option and re-select the dialog or if you select Recalculate.

NOTE: Recalculating DOES NOT change the value of the Bytes per File input value, it only refreshes the conversion dialog.


Encoding Mode

Perhaps in a later version this will be fully supported. For now, you can change the value but encoding and decoding is done in mode 644.


Encode File Extension

This allows you to set the file-extension your encoded files will all have. Generally, this is 'UUE'. However, it can be anything you want.


Encode Directory

This allows you to set the directory in which your encoded files will be created. A VALID directory must be indicated when entering this value. If you wish to have Wincode create the encoded files in the SAME (current) directory as the binary files, enter a single period (.) as the Encode Directory.


File Headers
Section Headers

This option, when checked, will create Section Headers for each encoded file. The Section Headers mark the BEGINning and END of the file. The headers indicate a 'part-number' (important for multiple files) and filename (of the original file) for each encoded file.

Format:

[ Section: xx/yy  File: filename.ext  Encoder: Wincode v# ]

where

xx/yy indicates the part number (xx) from the total parts (yy)

filename.ext indicates the original BINARY file

# indicates the Wincode version number


Single File

This option, when checked, over-rides the Bytes per File option and encodes the input-file into ONE encoded file. The Bytes per File option is disabled until this option is unchecked.


Decode File Extension

This allows you to set the file-extension your decoded files will all have. Generally, this is 'UUE'. However, it can be anything you want.

NOTE: this file extension setting is IMPORTANT: when you select FILE|DECODE, only files with the extension you chose will appear in the FILE OPEN dialog. Also, and more importantly, if you  Drag and Drop files on the Wincode window or icon, ONLY the files with the extension set here will be batch DECODED...


Dump Directory

This option allows you to set a directory into which encoded files are 'dumped' after they have been decoded. Wincode first reads the entire original file into memory while creating a copy (in the specified 'dump' directory) with the extension WCT. If the file copy is completed ok, it erases the original encoded file and renames the WCT file in the 'dump' directory. Wincode will warn you if duplicate file names exist.


Decode Directory

This allows you to set the directory to which your input-files will be decoded. A VALID directory must be indicated when entering this value. If you wish to have Wincode create the decoded files in the SAME (current) directory as the encoded files, enter a single period (.) as the Decode Directory.


Run Decoded

This option allows you to run the newly decoded programs instantly. Wincode automatically scans your WIN.INI file for ASSOCIATIONS (matches file extensions to executables) and runs the appropriate program with the newly decoded file as a command line parameter. If no associations are found, it treats the decoded file as 'executable' and tries to launch it. This can be useful for GIF files, self-extracting files, etc. where you don't want to switch back and forth between programs (i.e. Wincode and File Manager) to decode and run.

NOTE: As a precaution Wincode will prompt you before launching any files.


Error Checking

Wincode incorporates many Error Checks when en/de-coding a file. However, in order  to save on time and user input, you can shut this feature off. If you encounter  a problem with a decoded file, turn this feature on (by checking it) and try  re-decoding the file using the FILE|DECODE Menu option.

The following types of Errors are monitored:

 Memory Allocation Errors.

 Whether an Input File exists and/or can be opened.

 Error-Handling for temporary files (applies to DUMP option).

 Existence of a Mode value in the Header.

 Existence of a Filename value in the Header (provides a one-time  option to change the filename to a valid DOS filename).

 Existence of begin/end pair in encoded files being Decoded.

 Number of characters per encoded line (now includes a  Space-Replace option!]).

 Individual characters in each line are checked for validity.

 Assorted Errors for handling Multi-part files.

(The above listing represents an abbreviated list of actual Errors Wincode can detect.)

NOTE: The level of error-checking varies depending on the method in which  the User selects a file. By default, when you perform Batch decoding, (most)  error-checking is off. Using the FILE|DECODE option ensures the most  error-checking providing the OPTIONS|DECODE...|ERROR CHECKING option is set.


Space-Replace

Sometimes, during transmission, encoded files which contain ASCII character #32 (a blank  space), get stripped of this character (using a reverse quote rather than the blank space  for encoding generally overcomes this error). Wincode provides the Space-Replace option  to allow you to replace the 'missing' characters with blank spaces (ASCII #32) on-the-fly  (i.e. as it decodes it). This error occurs in an encoded line whose length is less than  60 characters.


Create Report File

This option allows you to create Report files for either the Encoding or Decoding  process (or both at the same time!). The files are named WC_E_RPT.number  for Encoding or WC_D_RPT.number for Decoding where (in either  case) number is a given extension starting at '001' and ending at '999'. Wincode  will assign the extension in increasing order to prevent overwriting Report files.  If, by chance, you reach 999 files, Wincode will loop back to file number 001 and  overwrite it (if it exists). Report files, by default, are placed in the same  directory as the file that is being en/de-coded.

For Encoding, the Report file contains the following information:

 The Input file it is Encoding.

 The Original (input) File Size.

 The Approximate Encoded File Size(s)...generally this is accurate  to within 10 bytes.

 The File it is Encoding the Input file into.

 The Total Number of Encoded Files.

 Any Error Messages that may arise!

For Decoding, the Report file contains the following information:

 The name of the Encoded file it is Decoding.

 The Input File Size.

 The name of the file being Decoded.

 Any Error Messages that may arise!


Start As Icon

This option allows you to start Wincode as an icon. This option is useful if Wincode is pre-configured and you wish to process files by  drag and drop.

NOTE: When Wincode runs as an Icon, it operates considerably faster in both encoding and decoding.


Working Directory

Select this option to choose the default start-up directory for Wincode. Whenever you select the FILE|ENCODE or FILE|DECODE option, the default directory for selecting input files is determined by this setting.


Configuring Wincode
Configuration

Choose this to display the active (that is, while the program is running) settings for Wincode. By choosing SAVE, these settings will be written to your WINCODE.INI file (the WINCODE.INI file is created only after you choose SAVE). Otherwise, choose EXIT and nothing changes. If you change an option, it is NOT written to disk unless you select SAVE, however, any configuration changes during the active session will be displayed in this dialog. If the configuration is changed and not saved before exiting, a reminder message will appear upon exiting.

NOTE: The current position of the Wincode window is also saved each time you select the SAVE button.


Reload from Disk

Select this to reload the configuration in the WINCODE.INI file. If WINCODE.INI does not exist, the configuration is reset to program defaults.


 	Drag and Drop

The drag & drop feature essentially allows batch en/de-coding. To use this option, open a session with any file-manager program that allows Drag & Drop processing of files. Then, select all the files you want to en/de-code and drop them on the Wincode window (or icon). Each file is processed using the specifications of your active Configuration. Wincode will DECODE all dropped files which carry the extension you set for decoded files (see 'Decode Extension'), otherwise, it will ENCODE the files. For decoding multi-part files, you only need to drop the FIRST file of the series (Wincode finds the rest). However, you can select an entire directory of files (single and multi-part files to be decoded AND files to be encoded) and Wincode will correctly analyze and  en/de-code all valid files (you will notice it searches through invalid files very quickly). When Wincode is batch processing (i.e. you've dropped files on it), many default error messages are suppressed. If a decoded file appears corrupt, try decoding it again by using the FILE|DECODE menu choice with Error Checking ON and  Wincode may report the errors.

NOTE: If you try to decode a non-sense file, Wincode will scan and ignore it.


About

Displays the program name, version and company name.


Contacting the Author

Wincode was created for my own needs. Hoping others would find it useful, I decided to release the program and distribute it as FREEWARE. Although I have been programming Turbo Pascal for quite some time (under the name Snappy_Inc), this is my first PUBLIC software release. Please let me know if you find any bugs, glitches, whatever by e-mailing me at one of the following addresses:

 Internet: silva@tethys.ph.albany.edu

 CompuServe: 74640,1647

 America Online: Snappy

Also, if you need help, support, the latest version of Wincode or just want to let me know you like/hate the program, PLEASE drop me a line. I'll try and reply to all letters I receive...

Thanks for trying and using Snappy_Inc software...

G.H. Silva

I'd like to thank everyone (you know who you are) who sent encouraging suggestions  and comments...You have helped me shape Wincode into more useful program.


Disclaimer

DISCLAIMER: I MAKE NO GUARANTEE THAT THIS SOFTWARE WILL FUNCTION FLAWLESSLY NOR WILL I TAKE ANY RESPONSIBILITY FOR DAMAGES INCURRED BY THE USER EITHER ACCIDENTALLY OR INTENTIONALLY THROUGH THE USE OF THIS SOFTWARE. THE SOFTWARE IS PROVIDED AS IS. IT IS FREEWARE AND YOU MAY DISTRIBUTE IT AS SUCH PROVIDING YOU KEEP THE HELP FILE, THE PROGRAM FILE AND THE INTRODUCTORY TEXT FILE IN ORIGINAL INTACT CONDITION. THE PROGRAM MAY BE DISTRIBUTED IN SHAREWARE\FREEWARE PACKAGES IN WHICH FEES COVER DUPLICATION/MEDIA COSTS. THIS PROGRAM MAY NOT BE SOLD COMMERCIALLY OR PRIVATELY WITHOUT THE PERMISSION OF THE AUTHOR.


Version History

Version 1.4 --- This version. Enhancement of v1.3; Public Release #3.

Version 1.3 --- BETA version. Changed the *entire* look of Wincode. It now supports the following:

 Multi-tasking ability enhanced (won't hog CPU).

 Added 'Stop' and 'Quit' options when en/de-coding.

 Better Encoding support..includes a reformatted section header which provides more detailed info (part of total and filename).

 *Much* better decoding abilities: fixed a few decode algorithm bugs; added ability for multiple file decoding from single file (even handles  multiple-multiple file decoding from single file!); added ability to decode UNIX or MAC  based TEXT files in addition to DOS-based TEXT files.

 En/de-coding Information window was enhanced.

 Changed Lines per File to Bytes per File (more accurate file sizing).

 Added 'in same directory' ability for en/de-coding.

 Added 'Dump directory' option for encoded files that have been decoded.

 Removed Command Line option and added WIN.INI association search for running decoded files.

 Added Error Checking On/Off option to speed decoding.

 Added Space-Replace Option.

 Added ability to change input file name if invalid.

 Added the REPORT FILE option.

 Added the 'Start As Icon' option - it increases the en/de-coding speed by not having to display a window.

 Added ability to take a command line file when starting Wincode.

 Added single-instance limit.

 Added HELP file and modified the main menu.

 Modified the ABOUT box.

 Added the 'Percent Processed' to main Window when executing batch-jobs.

Version 1.2 --- Fixed the 'next-file-in-sequence' search algorithm. The original search routine would look for a (uppercase) "M" to begin decoding...some non-encoded header text would occasionally fool Wincode. The new search routine looks for the first line of VALID encoded characters before decoding (essentially proof reading)...

Version 1.1 --- Removed the 'DROP TO xxCODE' option. Wincode now uses the file extension (see 'FILE|DECODE...|EXTENSION' option) to decide which files should be encoded and which should be decoded. With this, you do not need to switch back and forth between encoding and decoding options (Wincode will do the work for you...)

Version 1.0.3 --- Original release of Wincode.


Wincode.INI
Wincode.INI File

The format and explanations are as follows:

[Encode] 	(all these parameters affect ENCODING)

ByteLinesPerFile= (stores the output file length in KB)

Mode= 	(stores the encoding mode value)

Extension= 	(stores the default encode file extension)

Directory= 	(location where encoded files are created)

Headers= 	(turns headers on (yes) or off (no))

SingleFile= 	(encode to one file (true) or not (false))

[Decode] 	(all these parameters affect DECODING)

Extension= 	(stores the default decode file extension)

RunDecoded= 	(determines whether to run (yes) or not (no))

ErrorChecking= 	(determines the state of Error Checking (true/false))

DumpDirOn= 	(determines whether to dump (true) or not (false))

DumpDir= 	(location where encoded files are dumped after decoding)

Directory= 	(location where encoded files are created)

[Wincode] 	(Wincode over-all defaults)

WhereX= 	(co-ordinate for upper left corner of Wincode window)

WhereY= 	(co-ordinate for upper left corner of Wincode window)

CreateReportFile= (Create a Report File (true) or not (false))

StartAsIcon= 	(determines whether to start as icon (true) or not(false))

Directory= 	(location of default working directory)

***This file should be deleted each time a new version of Wincode is installed. Otherwise, the file may contain extraneous text (Wincode will work just fine, though).


SMART Decoding

SMART decoding involves being able to manipulate input files such that the user does the least amount of work. Wincode now has the ability to decode:

 single files

 multi-part files

 multi-part single files

 multiple multi-part single files

(a future prospect involves decoding by reading header info)

The 'intervening' text need not be removed in ANY of the files, Wincode will decide what is encoded and what is not. The only requirement is that the files be in order. This means that for 'multi-part file containing' single files, part one must precede part two (etc) within the file. However, part three could exist in another file provided the file is 'numbered' and follows the first file!

See Space-Replace and Error Checking.


Single File

This type of file consists of a single encoded file from 'begin' to 'end'.

Format:

file.uue:

begin 644 file.exe

..........

(encoded info--file.exe)

..........

end

etc...


Multi-Part Files

This condition contains one encoded file split into several files.

Format:

file1.uue:

begin 644 file.exe

..........

(encoded info--file.exe)

..........

file2.uue:

..........

(encoded info--file.exe)

..........

file3.uue:

..........

(encoded info--file.exe)

..........

end

etc...


Multi-Part Single Files

This type of file contains the Multi-Part File concatenated into a single text file.

Format:

file.uue:

begin 644 file.exe

..........

(encoded info--file.exe)

..........

(intervening text)

..........

(encoded info--file.exe)

..........

(intervening text)

..........

(encoded info--file.exe)

..........

end

etc...


Multiple Multi-Part Single Files

This condition involves Multi-Part Single Files that are enumerated and 'split' over several files.

Format:

file1.uue:

begin 644 fileA.exe

..........

(encoded info--fileA.exe)

..........

(intervening text)

..........

(encoded info--fileA.exe)

..........

(intervening text)

..........

(encoded info--fileA.exe)

..........

end

begin 644 fileB.exe

..........

(encoded info--fileB.exe)

..........

file2.uue:

(intervening text)

..........

(encoded info--fileB.exe)

..........

(intervening text)

..........

(encoded info--fileB.exe)

..........

end

begin 644 fileC.exe

..........

(intervening text)

..........

(encoded info--fileC.exe)

..........

(intervening text)

..........

(encoded info--fileC.exe)

..........

end

etc...


Future Prospects

 Allow decoding of files by scanning 'section headers'. I actually need your (yes, you) help with this...if there are 'standard' headers which you are aware of, could you please e-mail them to me. I would like Wincode to be able to interpret many header formats.

 Any useful suggestions users may have?