////////////////////////////////////////////////////////////////////// // PUT THE FOLLOWING DECLARATIONS IN THE HEADER FILE ////////////////////////////////////////////////////////////////////// HINSTANCE FFLibDllHandle; int ( __stdcall *pfnFFAscii2Tiff )( HWND, char*, int, char*, char*, int, char*, char*, char* ); ////////////////////////////////////////////////////////////////////// // SECTION ONE --- PRELIMINARY OPERATIONS ////////////////////////////////////////////////////////////////////// // load the DLL FFLibDllHandle = 0; FFLibDllHandle = LoadLibrary ( "FFLIB.DLL" ); if ( FFLibDllHandle == 0 ) { MessageBox ( NULL, "LoadLibrary:\nFFLIB.DLL not found.", "Error FS 001", MB_SYSTEMMODAL ); PostQuitMessage ( 0 ); } // load the address of FFAscii2Tiff pfnFFAscii2Tiff = ( int ( __stdcall *)( HWND, char*, int, char*, char*, int, char*, char*, char* ) ) GetProcAddress ( FFLibDllHandle, "FFAscii2Tiff" ); if ( pfnFFAscii2Tiff == NULL ) { MessageBox ( NULL, "GetProcAddress:\nFFAscii2Tiff not found.", "Error FS 003", MB_ICONSTOP ); return; } ////////////////////////////////////////////////////////////////////// // SECTION TWO --- convert the text file ////////////////////////////////////////////////////////////////////// // call the function pfnFFAscii2Tiff ( Application -> Handle, "C:\\LAVORI\\BCB\\LibroGiornale\\FooBar.txt", 0, "C:\\LAVORI\\BCB\\LibroGiornale", "comment", 1, "first header line", "second header line", "third header line"); ////////////////////////////////////////////////////////////////////// // SECTION THREE --- FINAL OPERATIONS ////////////////////////////////////////////////////////////////////// // free the DLL if ( FFLibDllHandle != 0 ) FreeLibrary ( FFLibDllHandle );