


  
----------------------------------------------------------------------------------------
  CONTENTS
----------------------------------------------------------------------------------------

  

          HISTORY

          FUTURE
  
          THE ORIGINAL VERSION VS. THIS VERSION
  
          THE PROGRAM'S MAIN FEATURES

	  DISCLAIMER

          OPERATIONS
  
  
  
  
----------------------------------------------------------------------------------------
  HISTORY
----------------------------------------------------------------------------------------

This program started out as a testing ground for trying out new 
things. Eventually it took on a life of its own, and I decided 
I would share it with other people, for free. 

This is the first release of the program, and has version 
number 1.0 - Alpha. 


----------------------------------------------------------------------------------------
  FUTURE
----------------------------------------------------------------------------------------

I may consider releasing upgrades, if there is any interest 
in the Clarion Community for me to do so.
I wouldn't mind doing this in collaboration with others who
would like to contribute. Of course, there is no money involved 
in this project - and no time limits. But the learning 
opportunities... 

One interesting approach would be to integrate the Clarion 
API database to make a LIB-file and a INC-file (with the exported 
function's prototypes) in one operation.


----------------------------------------------------------------------------------------
  THE ORIGINAL VERSION VS. THIS VERSION
----------------------------------------------------------------------------------------

		   "LibMaker--Make a TopSpeed .LIB for any .DLL
		This application is a fully-functional utility that 
		creates a .LIB file in the TopSpeed format from 
		any .DLL (or multiple .DLLs), whether that .DLL has 
		been compiled with a TopSpeed compiler or not. This 
		allows you to link any Windows .DLL to a Clarion for 
		Windows program. One .LIB file can provide the 
		linking information to multiple .DLLs."

					Guid to the Sample Applications
					TopSpeed Corporation


First of all I must say that I recognize the original LibMaker 
program from TopSpeed as a sophisticated data program that can 
read the complex header information about exported functions in 
DLLs and transform that data into a Clarion LIB-file. 
It is not within my scope, especially without any proper documen-
tation, to make any improvements in those procedures which handles 
those crucial tasks.

So when I eventually decided to make this program, I wanted to
make certain that none of the code that read, write or handle 
the vital data of the library files was touched. To this end, 
I took the source code file 'Libmaker.clw' labelled the map 
protypes, the file declarations and the procedures themself with 
section names and saved the file. And that was the only thing I 
planned to do with the original source code. I include these 
sections in my own source code at their respective places. Then 
I may call the procedures whenever I want to read from or write 
to a file. (I, however, had to make one correction in the original 
code: If you try to load an old DOS EXE-file - NE magic: "MZ" - the
program will most likely hang, and you get an GPF. I had to correct
this by preventing these files to be opened by the program. I also
put in some passive code for trapping errors during read and write 
procedures, as these would not otherwise be detected.)

Consequently, this version of LibMaker does not "make" anything 
which the original version does not make; In fact, the end product, 
the LIB-file, is identical. 

Given the fact that the entire original program is on approximately
450 lines of source code - comment lines included - it is quite 
obvious that the creators of the program did not spend much on any 
user interface. In fact the code spent on the user interface is 
reduced to an absolute minimum. It's true that you don't need 
it - the program does it's job. But then again, the users of 
computers today have become accustomed to an increasing level
of sophistication in their interaction with their machines. There's 
certain things that you take for granted. You do one thing and 
expect the machine to react in a predictable way, no matter what 
program you're running. This even goes for computer programmers.

The motivation behind this version of the program is that I felt 
that LibMaker needed a proper user interface. So what I've done 
is that I've tried to bring the program's functionality up-to-date 
so to speak. Things like search routines, sorting of data, extraction 
of data by query routines, data statistics and comparisons, storing 
of user options down to the width of columns in list boxes, even 
automated data processing. Not to forget feedback in the form 
of message boxes. All these things are taken for granted in most 
Windows programs today. Now you can have them in LibMaker too. 
And a few things more.


----------------------------------------------------------------------------------------
  THE PROGRAM'S MAIN FEATURES
----------------------------------------------------------------------------------------

When I first set out to make the layout of the program, I wanted 
to preserve the simple general appearance and feel of the 
original LibMaker program as much as possible. I even kept the 
five buttons in the main window to add a touch of continuity and 
familarity. At the same time I wanted to put in as much 
functionality as possible. And I wanted to do this without 
overcrowding the interface, or to be too imposing on the user. 
I hope I have succeded in this.

All the code is original and handcoded by me, except for the file- 
declarations, and the read and write procedures included from the 
original source code. I have also used the "INIRestoreWindow" and 
"INISaveWindow" procedures from the Clarion templates included 
with Clarion 4.

Here is a list of the most important improvements in this program
in relation to the original program. The code I started with 
was included in Clarion 1.5 dated september 1995.

1.	Some upgrade of the graphical layout. Natural features like 
	listbox headers, refreshing window display when appropriate, 
	resizeable columns, message boxes, new icons, tooltips, 
	statusbar, pop-up menues, marking of rows, sorting of data 
	by clicking on headers, etc.

2.	Introduced the consept to distinguish between "source" 
	library files (DLL-files, EXE-files etc.) and "target" library 
	files (LIB-files). I mostly refer to the first type as "modules" 
	and the latter as "the library file". Even so, a LIB-file may 
	also be a "source" file. In that case, the added LIB-file's 
	modules are merged with the open library's modules.

3.	Long filename support.

4.	Added command line parameter checking. Most
	importantly, the program now takes a single file
	or multiple filenames as command line parameters. 
	This may be utilized in combination with extension 
	association so that when you doubleclick a DLL or 
	a LIB file it will automatically be openened in 
	Clarion LibMaker.
	The program can be set up to create the LIB-file
	automatically and silently in the background.

5.	Included the new source code for "optional headers" 
	in addition to upgrade of export table procedures
	from a newer version of the source code included
	in Clarion 4 released in 1998.

6.	Developed procedures for maintanance of historical files. 
	Up to fourty filenames may be stored and up to twenty 
	shown in the pop-up menu (or in any menu). The filelist 
	is configurable via an user dialog accessed from the 
	Advanced Options dialog.

7.	Procedure for query extraction of functions/procedures
	from opened library files. The extracted list may be 
	handled and stored as a library file of its own. 
	Multiple extractions may be made on top of each other. 
	The same procedure is also utilized as a plain search 
	dialog, also in the library and the compared modules 
	list. The last fourty keywords are stored so it's easy 
	to repeat a search or query.
	Multiple keywords may be entered for each search.

8.	Added drag & drop functionality. Files may be dropped from
	Explorer, File Manager or any other program with file
	dragging capabilities. The drop zone is the program's 
	main window. Multiple file names are supported.

9.	An option tab for setting and changing many user options
	like default source and target folders, opening last file
	at startup, etc. The last fourty used folders are reached
	via dropdown lists so that the most used locations become
	easily accessible. These options are stored in a INI-file
	called "LibMaker32.ini" and placed in the Windows folder.

10.	Developed a procedure for showing text in listboxes that
	are too long to be shown within the column. In case the
	text is too long, and when clicked on, it will be shown 
	in a pop-up window that covers the text beneath and is 
	sized as long as necessary to show the whole text.
	
11.	Made a button for showing an easily accessible quickmenu. 
	This quickmenu can be configured after the user's own 
	needs.

12.	Developed a procedure for comparing the modules in the
	library to the source library files on disk (DLLs). If anything 
	has been changed in the library (LIB-file) in relation to the 
	source files on disk, or vice versa, this will be detected and 
	shown in a list in the "Compared modules" tab. This tab has a 
	popup-menu of its own, and among other things it is possible 
	to show only the changes. 
	This feature may also prove useful in cases where you suspect 
	the files on disk have been updated or otherwise changed.

13.	All commands in Clarion LibMaker are accessible from
	keyboard shortcuts. The only exception to this is changing
	column widths. See below for a complete list of all the
	menu commands and keyboard shortcuts.

14.	There is a rudimentary statistics dialog. The statistics data
	in this dialog is very limited at present, but the dialog is 
	designed to hold comprehensive data files that are associated 
	with their respective LIB-files. This data files could contain 
	any number of items of relevant information pertaining to the 
	LIB-files or the included modules (DLLs). This may be 
	implemented in a future version.

15.	Included code for error trapping during all major read and write 
	procedures. The code basically checks for errors posted 
	concerning "Out of memory" and "Out of disk space". These are 
	errors that are not detected in the original code, and if 
	ignored will lead to unpredictable results.
	In addition all kinds of errors during read/write procedures
	as well as all major QUEUE operations are trapped.

16.	The program is named "Clarion LibMaker 32" because it's 
	compiled for 32-bit systems. If you are running Windows 3.X
        and are interested in the "Clarion LibMaker 16" version, send 
	me a note. After I started to get the message "Dynamic pool 
	limit exceeded isl.plists" from the Clarion compiler there is 
	no operational 16-bit version of the program at present. But 
	if there is any interest in it, I will try to put it together 
	and post that version too.



----------------------------------------------------------------------------------------
  DISCLAIMER
----------------------------------------------------------------------------------------

This software is provided as FREEWARE and cannot be sold. 
You are granted the right to use and to make an unlimited number 
of copies of this software, and the unchanged files may be 
freely distributed free of charge.

The author of this program accepts no responsibility for damages 
resulting from the use of this product and makes no warranty or 
representation, either expressed or implied, including but not 
limited to, any implied warranty of merchantability or fitness 
for a particular purpose. This software is provided "AS IS", 
and you, its user, assume all risks when using it.




Tor Stokkan
Oslo, August 1999









----------------------------------------------------------------------------------------
  OPERATIONS
----------------------------------------------------------------------------------------


  	1. KEYBOARD COMMANDS.

  	2. MOUSE OPERATIONS.

  	3. DRAG & DROP.

 	4. COMMAND LINE PARAMETERS.

  	5. TEMPLATE AUTOMATION.

	6. GENERAL WINDOWS COMMANDS.

	7. HOW TO MAKE A FILE ASSOCIATION.




  1. KEYBOARD COMMANDS.

  To avoid the "mouse sickness" try using keyboard commands
  to control you applications. Most things in Windows
  can be accomplished with the keyboard by use of keyboard 
  shortcut commands.

  The following shows a list of the keyboard shortcuts for 
  Clarion LibMaker 32. To use the keyboard commands the list 
  must be in focus.

  Main popup menu 		Alt+Z	Opens the main popup menu
						for the list in focus
  Quickmenu			Alr+Q	Opens the quickmenu for
						the list in focus

  Library list commands (Column to the left is the corresponding
  popup menu item):

  Library file (Target)
	New...			Ctrl+N	Make a new LIB-file
	Open library		Ctrl+O	Opens an existing LIB-file
	Library statistics...	Alt+D (F4) Opens the library statistics 
						dialog
	Save			Ctrl+S	Saves the LIB-file
	Save as...		Alt+S	Opens the filedialog to save 
						the LIB-file
	Revert			Ctrl+R	Reverts to the LIB-file stored 
						on disk

  Modules (Source)
	Add module...         	Alt+A	Opens the filedialog to add a 
						source file (DLL) to the 
						library
	Remove module		Ctrl+Del Removes the highlighted module
	Revert			Alt+R 	Revert to the (highlighted) module 
						file (DLL) stored on disk
        Compare to disk...      F2 	Opens the Compare Procedure
						dialog to compare modules 
						to files on disk
	Clear all		Alt+E	Remove all modules from the 
						LIB-file - clears the list

	--------------
	Find...			AltF3	Opens the search dialog to search 
						the library for function 
						names
	Find next		F3	Repeats the last search operation 
						- finds the next match
	Goto line...		Ctrl+G	Opens dialog to goto a specified 
						ordinal line number

  Mark rows
	Toggle mark		Space 	Set or clear the marking of the 
						highlighted row
				Space+Shift will mark highlighted row 
						and move down to the next row
	Mark all		Ctrl+A	Marks all the rows in the 
						library list
	Remove all marks	Ctrl+Shift+A Removes all the markings 
						in the library list
	Invert markings		Alt+I (also the NUM *-key) 	Invert all the 
						markings in the library list

	--------------
	Extract 		Alt+E 	Will extract either the 
						highlighted row or all the marked 
						rows to the extracted functions 
						list
	Delete			Del	Will delete/remove either the 
						highlighted row or all the 
						marked rows

  Sort list
        Sort by name   		Alt+N  	Sorts the library list first 
						by module names then by function 
						names
        Sort by ordinal 	Alt+O   Sorts the library list first 
						by module names then by ordinal 
						sort order
	Unsorted            	Alt+U	sorts the library list in the 
						order the functions was found 
						in the modules
	Ascending		Ctrl+NUM Plus   Sorts the library list in 
						ascending order
	Descending		Ctrl+NUM Minus  Sorts the library list in 
						descending order

	--------------
	Expand all		Alt+X	Expands all modules in the 
						library list
	Contract all		Alt+C	Contracts all modules in the 
						library list
	Toggle expand/contract
	  highlighted module	NUM plus-key or NUM minus-key

  	Previous files		Accessible only from pop-up menus.


  Extracted functions commands

        Query...            	Alt+Y	Opens the query functions 
						dialog to extract functions 
						to the list
	Save as...         	Alt+S  	Opens the filedialog to save 
						the extracted functions list 
						as a LIB-file. Filename default 
					 	to the selected module as a base.
						"_extract" or "_e" is added as a
						suffix to the filename, depending
						on whether LFN are on or off.
	Clear all           	Alt+E   Removes all the rows in the 
						extracted functions list
						- clears the list
	Delete              	Del	Deletes the highlighted row
	Find                	Alt+F3 	Opens the search dialog to 
						locate functions in the 
						extracted functions list
	Find next           	F3	Find the next match - as 
						defined in the last search 
						dialog
	Goto line           	Ctrl+G  Opens dialog to goto a specified 
						ordinal line number in the 
						extracted list
  Sort list
        Sort by name   		Alt+N  	Sorts the extracted list 
						first by module names then by 
						function names
        Sort by ordinal 	Alt+O   Sorts the extracted list first 
						by module names then by ordinal 
						sort order
	Unsorted            	Alt+U	sorts the extracted list in the 
						order the functions was found 
						in the modules
	Ascending		Ctrl+NUM Plus   Sorts the extracted list in 
						ascending order
	Descending		Ctrl+NUM Minus  Sorts the extracted list in 
						descending order


  Compared modules commands

        Compare to disk...      F2 (Alt+C) 	Opens the Compare Procedure
						dialog to compare modules 
						to files on disk
	Udate list...         	Alt+D  	Updates the compared list as
						defined in the last compare run
	Clear all           	Alt+E   Removes all the rows in the 
						compared modules list
						- clears the list
	Show only changed       Alt+S	Toggles the list by showing only 
						changed lines and all lines
	Open report		F4	Opens the change report 
						dialog
	Find                	Alt+F3 	Opens the search dialog to 
						locate functions in the 
						compared moduls list
	Find next           	F3	Find the next match - as 
						defined in the last search 
						dialog
	Goto line           	Ctrl+G  Opens dialog to goto a specified 
						ordinal line number in the 
						extracted list
  Sort list
        Sort by name   		Alt+N  	Sorts the compared moduls list
						by function names
        Sort by ordinal 	Alt+O   Sorts the compared moduls list 
						by ordinal sorting order
	Unsorted            	Alt+U	sorts the compared moduls list in the 
						order the functions was found 
						in the modules
	Ascending		Ctrl+NUM Plus   Sorts the compared moduls list
							in ascending order
	Descending		Ctrl+NUM Minus  Sorts the compared moduls 
							list in descending order


  Miscellaneous keys
  Use the F5 key to show text that is longer than the column it 
  is displayed in. It will then be displayed in a "text bubble".
  The direction keys will move the cursor and/or scroll a list.
  The HomeKey on a list moves the cursor to the top of the list, 
  and the EndKey moves it to the bottom of the list.
  On a text display like this one or any other text display, for
  instance Notepad, AltGr+Home (or Ctrl+Home) puts the cursor at 
  the very beginning of the text, and AltGr+End (or Ctrl+End) 
  puts it at the end.
  The F1 and F10 keyes opens a preliminary help text, which actually
  is a summary of the commands explained here.
  



  2. MOUSE OPERATIONS.

  Popup Menues
  Right-click on the lists to get the main popup menu. 
  Click on the [>] button to get a quick menu. You can
  change the quick menu in the Advanced Options dialog,
  accessed in the Options tab, to suit your particular
  needs of the moment.

  Sorting lists
  Double-click on headers to sort the selected list, or use
  the main menu item. Double-click on the rightmost blank 
  column to sort by "unsorted" (i.e. the original sort order 
  in the source files). Double-click once more on the same
  colum to toggle between ascending and descending. 
  You may also set up the quick menu for sorting the library 
  list. The quick menus for the extracted and compared lists 
  are allways set on sorting. In the compared list you may
  also sort after the "Change" (comments) column.

  Markings & Selections
  The reason why you want to use markings is to get
  a better and easier way to make selections for
  delete or extract operations, so that the
  LIB-file only includes the functions you want.

  You can mark rows for selection in several ways:

  In 'Selection Mode' (red hooks) you can make markings by
  using the shift key or the left control key in combination
  with a single left click with the mouse. Once you
  release the key and click on the list all your markings
  will disappear.

	Multi sequential markings 		Shift+leftmouse
 	(Make a first selection - then another, and the
	intermediate rows will all be marked).
  	Toggle single unsequential markings 	Ctrl+leftmouse
	(To turn off/on selected marks)

  To make you markings "stick" without disappearing as in
  'Selection Mode' you can make markings by doubleclicking
  with the left mouse button on the rows you want to select. 
  This mode produces blue hooks to indicate that they will
  "stick".

  Another way to make markings is to enable the mark column
  in the 'Advanced options' dialog (from the options tab).
  Check the 'Use marker column' checkbox and a column with
  checkboxes will appear on the library list. Here you can
  make selections by checking the ones you want to mark,
  with one single mouse-click on the square icon.
  With the mark column the <Shift> and <Ctrl> modifiers work
  the same way as described above.

  To use the keyboard you can instead of the mouse use the
  spacebar. Use the space bar in combination with the <Shift>
  key and the highlight selection bar will skip to the next 
  row for each row you mark.




  3. DRAG & DROP.
  
  With the added drag & drop functionality in Clarion LibMaker it 
  is possible to drop files from Explorer, File Manager or any other
  program with file dragging capabilities, like Windows Commander. 
  The "drop zone" is the main dialog window. Multiple file names may 
  be dropped.
  


  
  4. COMMAND LINE PARAMETERS.

  The main command line parameter routine is checking for a single 
  file name or multiple file names. 
  This may be utilized in combination with extension associations so 
  that when you double-click a DLL or a LIB file in Explorer, or any 
  other file manager, it will be openened automatically in Clarion 
  LibMaker. See below on how to make a file association. 
  This feature also works the same way if you place the Clarion 
  LibMaker icon on the Windows desktop. Just drop library files (or 
  DLLs) on the desktop icon.

  (For example, if you have Windows Commander installed you may 
  place Clarion LibMaker on the toolbar and it will automatically 
  open the highligthed file when you press the LibMaker button. 
  Windows Commander emulates the old Norton Commander, and in my 
  opinion it is one of the best shareware file managers on the 
  market. To download Windows Commander for free evaluation go 
  to "http://www.ghisler.com/" if you are connected to the 
  Internet.)

  The command line functions capabilities of Clarion LibMaker 
  make it possible to create Clarion LIB-files dirctly from a 
  program, or, perhaps more appropriate, from within in a 
  Clarion template. To do so, use a command after this pattern: 

	RUN('c:\Clarion4\Bin\Libmak32.exe c:\projectx\mylib.dll /s',1)
 
  and the LIB-file will be automatically created, and may subsequently 
  be linked to your EXE-file.

  The complete command line parameter list is as follows:

	[ProgPath]LibMak32.exe pathfiles [/s[:savelib]]

  <ProgPath> - The path where LibMak32.exe is placed. May be
	omitted if it's stored in one of the paths included in the
	Autoexec.bat file, or is in the current (system) path.
  <Pathfiles> - a single file, or a comma- or space-delimtered 
	list of several files. 
  </s> - Specifies that the files are to be saved automatically
	to the first filename followed by '.LIB'. Clarion LibMaker
	will automatically be closed down after the operation is
	finished, and normally no window dialogs is opened. If 
	omitted the specified file(s) is loaded and the main window 
	dialog is opened.
  </s[:savelib]> - specify the LIB-file's path and file name. If 
	':savelib' is omitted the first filname in the filelist 
	is used as a base.




  5. TEMPLATE AUTOMATION.

  The command line parameters may be utilized to fully automate 
  the creation and adding of LIB-files to Clarion applications 
  and projects from within Clarion templates. 

  To create a LIB-file, use the following commands in the template:
        
	#DECLARE(%DllFile)
	#DECLARE(%LibFile)
	#DECLARE(%Parameters)
	#SET(%DllFile,'c:\myproject\mydll.dll')
	#SET(%LibFile,'c:\myproject\mylib.lib')
	#SET(%Parameters,%DllFile&' /s:'&%Libfile)
	#RUN('LIBMAK32.EXE '%Parameters,1)

  To add the new LIB-file to your project, use the following 
  template command statements (This must be done after Clarion 
  LibMaker has teminated, and is the reason for that the "waitflag" 
  must be set on the "RUN" command): 

	#AT(%CustomGlobalDeclarations)
	  #IF(CLIP(%LibFile) <> '')
	    #IF(FILEEXISTS(%LibFile))
	      #PROJECT(%LibFile)
	    #ELSE
	      ...
	    #ENDIF
	  #ELSE
	    ...
	  #ENDIF
	#ENDAT

  Within the template you may use any symbol variables to hold the
  the filenames and the command line parameters. 




  6. GENERAL WINDOWS COMMANDS.

  For your convenience I include some general windows 
  commands:

        Change control focus   	TabKey (+shift key to go backward)
	Change tab          	Ctrl+TabKey (+shift key to go backward)
	Close program 
	 in foucus     		Alt+F4
	Change focus to any open windows
	  program		Alt+TabKey (+shift key to go backward)

        System commands         Alt+SpaceKey 
				or AltKey+DownArrow+LeftArrow 
				(in sequence)

	(Use the "System commands" to move, resize, minimize 
	and maximize your application windows).
          
	Quit system command     Esc+Esc (two times) 
				or Alt (one time)

	Windows start menu	Ctrl+Esc

	To close any menu or dialog box use the "Escape key".


  If you have a "Windows Keyboard" with the "Win key" you can
  additionally use the following command shortcuts:

	Win key + E  		Opens an Explorer window  
	Win key + R  		Opens the Run dialog  
	Win key + Pause 	Opens System Properties  
	Win key + F  		Opens Find: All Files  
	Win key + Ctrl + F  	Displays Find: Computer  
	Win key + M  		Minimizes all open windows  
	Win key + Shift + M 	An undo for Win key + M  
	Win key + D  		Toggle that minimizes or maximizes 
                   		all open windows  
	Win key + Tab  		Cycles through program buttons 
                       		on the taskbar  
	Win key + F1  		Opens Windows help.  




  7. HOW TO MAKE A FILE ASSOCIATION.

  You can view, add, and remove file associations using the File Types 
  tab in the Options dialog box in My Computer or Explorer. In the 
  menubar item View select the pull-down menuitem Options in My Computer 
  or Explorer, then click the File Types tab.  In this tab you may add
  new file associations, remove or edit existing ones.



















