STRIPPER.EXE

This little program could stand improvement, but if you need
it, it will save you some work. It sorts the declarations in 
constant.txt, win30api.txt, win31ext.txt, and other such files,
into separate files of constant, sub, function, and type
declarations. It also strips the comments and prefixes. The
output files have the extension ".str". These are the files
of the format required by the AutoDec. It will also merge
the ".str" files which it produces, so that you can collect
declarations from various API texts and assemble them into 1 file.
These files will have a default extension of ".mrg"

Stripper does not alter your original files.

LIMITATIONS: There are some 64K limits which will cause
'Out of Memory' errors. Usually this happens when trying
to merge two files, one of which is over 64K in length.
   Also, the MS text style is presumed. If 3rd-party files
adhere to a similiar format, you can process them without
problem. (I extracted the files I use from those distributed
with D. Appleman's book, because they already had the obsolete
functions removed. Sheridan, Microhelp, and other vendors
distribute files which can processed by this utility.)

   The files used by AutoDec require several steps to create.
The process can become confusing so pay careful attention
to output names and the setting of option buttons. It may help
to create a couple of temporary subdirectories.

First, process each original file 4 times to produce 4 files.
These will be a 'Const', a 'Type', a 'Sub', and a 'Dec' file.
(Not all files will require 4 steps. Constants are often in a
separate already.) Give each an appropriate name.

   Move them out of the way (into a subdirectory perhaps) and
repeat the process for each original file you wish to sort.

   When this is done, all the files of a particular kind can
be merged to create a single file. For example, the 'constant'
declarations in the winXXapi.txt files can be extracted as above
and the several files then merged into a single file.
   If the file is to be used by AutoDec, rename it as per
the list at the end of this document, and move it into the
"..\decs" subdirectory . (This subdirectory should exist under
the directory in which vbwitch.exe was placed.)
   
To create a ".str" file:

	1. Click on a file. It should appear in 'Source..'
	and 'Output..', in the latter case with a ".str"
	extension. Change the output name if you need to.

	2. Select the kind of declarations which you wish
	to extract (i.e. Subs, Types, etc.). For a typical
	Microsoft file, which contains declarations of all
	kinds in a single file, it will be necessary to run
	the program 4 times, once for each of the 4 options.
	
	3. Click 'OK'. (Be patient, it's slow). When it says
	'Finished' you should have a ".str" file in the
	stripper directory.
	
	4. Repeat if necessary to get each of the 4
	kinds of declarations. Be sure to give each output
	file a unique name or it will be overwritten. (Sorry)
	
	5. Your original file will have now spawned up to
	4 files. Repeat the above for each original file
	whose declarations you wish to extract.

To create a merged (".mrg") file:

	1. Select the option button of the kind of ".str" files
	you are merging. If you are merging 'Type' declarations
	be sure the correct button is selected.
	
	2. Click 'Select'. Now click each of the two files
	you wish to merge.
	Both files should be of the same kind, 	i.e. they should
	both be ".str" files containing	constants, or both be
	subs, etc. (The merge process will proceed even if the
	files are of different kinds, so check if you are unsure,
	or you will produce a mongrel file.)

	Stripper does not alter the source files of a merge.
	
	3. The name of each file should be in the boxes
	at the bottom, with their respective sizes alongside.
	If either of the files is over 64K, the merge will
	fail. Try rebalancing them if this is a problem.
	
	4. Click 'Merge'. (Again, be patient.) When it finishes
	you should have a file called ".mrg" in the
	stripper directory. Move it or rename it before repeating
	the process to merge more files or it will possibly be 
	overwritten.
	
IMPORTANT NOTE: Check the output of each operation! Stripper
will sometimes show a file created that has no text, especially
for 'Types' if the 'Type' option button is not selected.
Also check each file for typos in the original that may have
resulted in distortions during stripping.

To create an AutoDec ".dec" file:
	
	The files used by Autodec were assembled as above
	from files distributed with VB. You can also
	produce these files manually or with some other
	utility. (I didn't have one at hand.) You can
	edit the files with any text editor.
	
	Following is a list of the 8 files used.
	They must have these names or you will get a
	'File not found' error attempting to access them.
	When AutoDec pastes a declaration, it prepends the
	prefix and a space(" ") to the text of the declaration,
	except in the case of 'Type' declarations.
	
	Filename:		Prefix:
	1. APICONS.DEC		"Global Const"
	2. APIFUNCS.DEC		"Declare Function"
	3. APISUBS.DEC		"Declare Sub"
	4. APITYPES.DEC		(none)
	5. CUSTOM.DEC		pfx1$
	6. USER1.DEC		pfx2$
	7. USER2.DEC		pfx3$
	8. VBCONS.DEC		"Global Const"
	
	pfx1$, pfx2$, pfx3$ must be specified by you in
	the [dec] section of "vbwitch.ini".
	
	The "custom.dec" file might be used for constants
	associated with custom controls by specifying
	pfx1$="Global Const"
	
	The user files can be used similiarly, except
	that you may wish to collect DLL or other
	functions here.
	
	
	