All TFORMer functions accepting filenames may also be called with a name of a ZIP-file or with a BASE64 encoded string (which may contain a zip-file again). More...
|
Functions | |
| TECIT_DLLSPEC HTUNZIPPER | TecUnzipper_Alloc (LPCSTR pszFilename) |
| Allocated memory for a new unzipper handle. | |
| TECIT_DLLSPEC HTUNZIPPER | TecUnzipper_AllocW (LPCWSTR pszFilename) |
| Allocated memory for a new unzipper handle. | |
| TECIT_DLLSPEC VOID | TecUnzipper_Free (HTUNZIPPER htUnzipper) |
| Deallocates memory allocated by TecUnzipper_Alloc. | |
| TECIT_DLLSPEC ERRCODE | TecUnzipper_DeleteAllFiles (HTUNZIPPER htUnzipper) |
| Deletes all files and directories on disk that have been created by TecUnzipper_Extract. | |
| TECIT_DLLSPEC ERRCODE | TecUnzipper_Base64Decode (HTUNZIPPER htUnzipper) |
| Tests if the passed to TecUnzipper_Alloc is a BASE64 encoded string and decodes it to a temporary file. | |
| TECIT_DLLSPEC ERRCODE | TecUnzipper_Extract (HTUNZIPPER htUnzipper, LPCSTR pszDirectory) |
| Extracts a ZIP file into a temporary directory. | |
| TECIT_DLLSPEC ERRCODE | TecUnzipper_ExtractW (HTUNZIPPER htUnzipper, LPCWSTR pszDirectory) |
| Extracts a ZIP file into a temporary directory. | |
| TECIT_DLLSPEC INT | TecUnzipper_GetFileCount (HTUNZIPPER htUnzipper) |
| Returns the number of files that have been extracted. | |
| TECIT_DLLSPEC LPCSTR | TecUnzipper_GetFile (HTUNZIPPER htUnzipper, INT nIndex) |
| Returns the filename with the specified index (0. | |
| TECIT_DLLSPEC INT | TecUnzipper_FindFileByExt (HTUNZIPPER htUnzipper, LPCSTR pszExtension, INT nStartIndex, BOOL bCaseInsensitiveSearch) |
| Finds the first file in the set of extracted files that matches the specified file extension. | |
| TECIT_DLLSPEC INT | TecUnzipper_FindFileByExtW (HTUNZIPPER htUnzipper, LPCWSTR pszExtension, INT nStartIndex, BOOL bCaseInsensitiveSearch) |
| Finds the first file in the set of extracted files that matches the specified file extension. | |
| TECIT_DLLSPEC LPSTR | TecUnzipper_Base64_Encode (LPCSTR szData, LONG lLen) |
| Creates a BASE64 encoded string. | |
| TECIT_DLLSPEC VOID | TecUnzipper_Base64_Free (LPSTR szStr) |
| Free a BASE64 encoded string created with TecUnzipper_Base64_Encode. | |
| TECIT_DLLSPEC LPCSTR | TecUnzipper_GetFilename (HTUNZIPPER htUnzipper) |
| Returns the filename of the zip file being used or of the temp file created by TecUnzipper_Base64Decode. | |
All TFORMer functions accepting filenames may also be called with a name of a ZIP-file or with a BASE64 encoded string (which may contain a zip-file again).
Functions in this group enable the software developer to implement an optimized handling of such zip-files (or BASE64 string).
Usually all TFORMer functions accepting files are trying to determine if it is a zip-file automatically (a BASE64 encoded file is determined by the BASE64: prefix). When TFORMer detects a zip-file it is unzipped automatically to the temp-directory of the current user. This automatic unzipping requires TFORMer to clean up such temporary files after the function call ends. If you want to avoid the per-function unzipping and deleting, then implement the unzipping functionality yourself by the TecUnzipper-functions. Thereafter pass the resulting files to the TFORMer functions.
ERRCODE eCode = ErrOk; LPCSTR pszFilename = "repository.zip";
HTUNZIPPER hZip = TecUnzipper_Alloc( pszFilename ); if( !hZip ) return ERROR_OUTOFMEMORY;
TecUnzipper_Base64Decode( hZip );
eCode = TecUnzipper_Extract( hZip, NULL );
if( eCode == ErrOk ) {
INT nIndex = TecUnzipper_FindFileByExt( hZip, "TFR", -1, TRUE ); if( nIndex == -1 )
eCode = ERROR_FILE_NOT_FOUND;
else
pszFilename = TecUnzipper_GetFile( hZip, nIndex ); } else {
pszFilename = TecUnzipper_GetFilename( hZip ); eCode = ErrOk; }
TecUnzipper_DeleteAllFiles( hZip );
TecUnzipper_Free( hZip );
| © 2006-2010 - all rights reserved by TEC-IT Datenverarbeitung GmbH |
![]() |
| Generated on Wed Aug 17 13:20:40 2011 for TFORMer Runtime DLL/Shared Library with doxygen 1.6.3 |