FFLib, a free good stuff Win32 DLL
(callable from within any win32 application program)
In this section I am going to introduce to you my personal win32 DLL. It encloses a few years of programming efforts that I have spent implementing many impossible to find features that were needed to face the needs of my customers. Read on, and you will find many interesting functions: Optical Mark Recognition, group 4-2d compression/decompression, full featured image display, SCSI and TWAIN scanner support, TIFF file support, and much more...

Index

Forewords

In the good old DOS days, until 1996, I was writing my Clipper images optical storage and retrieval application systems, and for the purpose of this I developed a special 16 bit assembly library that I used to link with the Clipper object files to get the complete working package. My first library included Extended Memory Management routines for fast image manipulation, SCSI scanner control, and even included an Optical Mark Recognition system that I wrote in 1991 for the italian nation-wide electric company (read
here the interesting story).

In the late '90s I had to translate my software in win32, and I started writing the DLL that you can now download here and use for free, as explained below. The complete DLL function reference together with 18 application examples are given too, all being contained in these web pages.

The DLL is composed of many functions that can be broken in three categories:

  • functions coming from the old DOS/Clipper library that have been ported from 16 to 32 bit with minor changes (for example: the group 4-2d compression & decompression routines, TIFF file support, etc.)
  • functions that had to be completely rewritten, for example the image display routines (in fact the old good BIOS INT 10h was no more available under win32, and I had to start using DirectDraw)
  • new functions, like Smart Card support etc.
The DLL has been completely written in x86 32 bit assembly. The source code is not given because it would take a long time to properly document more than twenty thousands assembly code lines, but maybe I will make it downloadable "as is" in the future.

These days I don't still program Win32 apps anymore, because I turned to Perl/MySQL under Linux since a few years, but I will be happy to think that my DLL can still be useful to other programmers in the web community.

Please note that I have been developing Win32 applications using the great Borland C++ Builder 3 professional edition, and any given application example in these web pages comes from my C++ Builder source code. But, except two, I put the examples in a IDE-independent fashion, so that you can easily import them in your projects.

Anycase the DLL can be called from any regular win32 compiler, from Delphi and Visual C++ as well, *and*, I am sure, there should be some way to call it from Visual Basic (don't ask me how, if anybody knows please tell me and I will update this web page).

Tested environments

The DLL has been tested in Win95, Win98, WinNT, Win2000 and WinXP. I suppose it works in WinME too.

Image display routines require DDraw 1. If you experience bad cursor behaviour while displaying images under WinXP please reinstall DDraw. If you get any "memory access violation" error message from Windows please check the parameters passed to the DLL function that you have been calling. No other special issues have been observed.

Conventions

Some simple conventions have been used when developing the DLL:
  • all the functions in the DLL use the Win32 standard calling convention (__stdcall); this means that the parameters are passed right to left and the callee (the DLL) is in charge for freeing the stack; for this reason standard Win32 application programs, for example those developed with C++ Builder, don't worry about the calling convention. Maybe Delphi application programs use the __pascal calling convention and need to reverse the order of the parameters. I am not a Delphi programmer. If anybody knows please advise and I will update this message
  • the prefix pfn means "pointer to function", infact any function in the DLL is called by means of a pointer, as you know, and not by its name

Function reference

The DLL is named FFLib, and provides you with the following 46 functions:

Download

NOTICE: the DLL will be available for download from September 1st, 2004, because I am registering my new domain, and I'll do that when I'll be back from holydays (August, 23th).

Here is the link to download the DLL. Please read and accept the following terms & conditions before downloading and using the DLL:

  • the DLL is provided "as is" and the author does not guarantee that the code is perfect neither that the code is error free
  • the author is not responsible for any complain, damage, error derived from the use of the DLL
  • you can use the DLL for free at your own risk
  • you can make any use of the DLL provided you don't modify its name and the DLL itself
Note: the DLL is fully functional and is free. When loaded it displays a little splash screen that reminds my web pages. If you want a copy of the DLL without the initial splash screen I think I am going to sell it, depending on the number of requests that I will receive.

Special thanks

I want to send special thanks to Iczelion. Everything I know about win32asm programming comes from his precious tutorials.

And also thanks to hutch for providing and maintaining MASM32.

Without the help of these two great people my DLL would have never born.