Tillanosoft:Downloads:tGetFile SDK

tGetFile SDK

Published Apr 24, 2001/Last updated Aug 6, 2005


tGetFile.dll is an alternative file dialog which can open arbitrary file under any folder. tGetFile SDK is a software development kit for developers to make their programs to support tGetFile.dll. This page describes how to make programs to support tGetFile.dll, etc.

Screenshot for tGetFile.dll
tGetFile File Dialog
Screenshot for tGetFile.dll
tGetFile Folder Dialog

1. The outline of supporting tGetFile.dll

To make programs to support tGetFile.dll, tGetFile SDK will be required. tGetFile SDK consists of a header file (tgetfile.h) and a library (tgetfile.lib).

In the case your application program has already used the GetOpenFileName() or GetSaveFileName() to open files, it would be quite easy for you to make your program to support tGetFile.dll. You just have to replace the GetOpenFileName() by tGetOpenFileName(), and also replace the GetSaveFileName() by tGetSaveFileName(). In another word, just put "t" on the beginning of each function name.

tGetOpenFileName() and tGetSaveFileName() will open the common file dialog if tGetFile.dll has not installed on the device. And they will open tGetFile.dll file dialog if the dll had installed.

tgetfile.h has very simple body and the practical lines of the file are the following two lines:

BOOL tGetOpenFileName(OPENFILENAME *);
BOOL tGetSaveFileName(OPENFILENAME *);

Since tgetfile.h refers to OPENFILENAME structure as above, commdlg.h should be included before tgetfile.h is included. In case of Smartphone SDK, use tgetdlg.h instead since Smartphone SDK does not contain commdlg.h.

Thus, the program which supports tGetFile.dll requires the following include statement:

#include <commdlg.h>
#include "tgetfile.h"

Or, as the following for Smartphone software.

#include "tgetdlg.h"
#include "tgetfile.h"

In the case your program uses GetOpenFileName() or GetSaveFileName(), your program must have included commdlg.h. So, please insert the include statement for tgetfile.h below the include statement for commdlg.h.

By the way, the current version of tGetFile.dll only supports the commonly used functions of GetOpenFileName() and GetSaveFileName() (see the next section). Please confirm if your essential functions have already supported by tGetFile.dll.

2. The functions which tGetFile.dll supports (in v4.3)

tGetOpenFileName() and tGetSaveFileName() which are provided by tGetFile.dll are the functions which take unique parameter with the type of a pointer to the OPENFILENAME structure. Here I will describe which member fields are supported by the current version of tGetFile.dll.

By the way, in the case of GetOpenFileName() and GetSaveFileName(), CommDlgExtendedError() reports what was wrong when one of the above two functions returns error. However, in the case of tGetOpenFileName() and tGetSaveFileName(), CommDlgExtendedError() will not report the error information. Please take care.

The OPENFILENAME structure is defined as follows:

typedef struct tagOFN {
    DWORD         lStructSize; 
    HWND          hwndOwner; 
    HINSTANCE     hInstance; 
    LPCTSTR       lpstrFilter; 
    LPTSTR        lpstrCustomFilter; 
    DWORD         nMaxCustFilter; 
    DWORD         nFilterIndex; 
    LPTSTR        lpstrFile; 
    DWORD         nMaxFile; 
    LPTSTR        lpstrFileTitle; 
    DWORD         nMaxFileTitle; 
    LPCTSTR       lpstrInitialDir; 
    LPCTSTR       lpstrTitle; 
    DWORD         Flags; 
    WORD          nFileOffset; 
    WORD          nFileExtension; 
    LPCTSTR       lpstrDefExt; 
    DWORD         lCustData; 
    LPOFNHOOKPROC lpfnHook; 
    LPCTSTR       lpTemplateName; 
} OPENFILENAME; 

The following is the support matrix for each fields of the structure:

2.1 Support matrix for structure fields

Field nameSupport status Note
lStructSize* tGetFile.dll does not access this field but it may bring no problem.
hwndOwnero
hInstance* tGetFile.dll does not access this field but it may bring no problem.
lpstrFiltero
lpstrCustomFilterx Not supported by CE.
nMaxCustFilterx
nFilterIndexo
lpstrFileo If the buffer is too small, the online document describes that "the first two bytes of the lpstrFile buffer contain the required size, in bytes or characters.". tGetFile.dll returns the required size in the first TCHAR area of the buffer in the case. By the way, it seems to me that the standard file dialog of Windows CE raises error dialog in the case of buffer shortage, and the function does not return.
nMaxFileo
lpstrFileTitleo Supported by v3.0
nMaxFileTitleo
lpstrInitialDiro
lpstrTitleo
Flags* See the next section
nFileOffset Will be supported in future version
nFileExtension
lpstrDefExto I am afraid that the behavior of tGetFile.dll around this field is a little different from the standard Windows CE file dialog. Please send me an email at if you found any difference.
lCustDatax Not supported by CE.
lpfnHookx
lpTemplateNamex

2.2 Support matrix for flags

Now only "o"-marked flags are supported. "x"-marked flags will not be supported even in the future. The empty marked flags are under consideration.

FlagSupport status Note
OFN_ALLOWMULTISELECTx Not supported by CE.
OFN_CREATEPROMPT
OFN_ENABLEHOOKx Not supported by CE.
OFN_ENABLESIZINGx
OFN_ENABLETEMPLATEx
OFN_ENABLETEMPLATEHANDLEx
OFN_EXPLORERx Ignored by CE.
OFN_EXTENSIONDIFFERENT
OFN_FILEMUSTEXISTo
OFN_HIDEREADONLY
OFN_LONGNAMESx Ignored by CE.
OFN_NOCHANGEDIRx Not supported by CE.
OFN_NODEREFERENCELINKSo Supported by v3.0
OFN_NOLONGNAMES* Not supported by CE, tGetOpenFileName() takes this flag in other meaning. If this flag is specified, tGetOpenFileName() will not show the "Name" field in its dialog. This function was introduced in ver 4.0. You can specify OFN_NONAMEBOX as an alias of this flag.
OFN_NONETWORKBUTTONx Not supported by CE.
OFN_NOREADONLYRETURNx
OFN_NOTESTFILECREATEx
OFN_NOVALIDATEx Ignored by CE.
OFN_OVERWRITEPROMPTo This flag does not work with Palm-size PC version since the built-in common file dialog ignores this flag.
OFN_PATHMUSTEXIST
OFN_PROJECTo Supported by v3.0
OFN_PROPERTY
OFN_SHOW_ALL Safely ignored by tGetFile.dll
OFN_READONLYx Not supported by CE.
OFN_SHAREAWAREx
OFN_SHOWHELPx

2.3 Calling from .NET Compact Framework

For .NET CF programs, two functions have been exported from tGetFile.dll v4.1:

Please import the functions in your .NETCF programs as follows:

Specify 0s for i1, i2 and i3. Also specify the result of Marshal.StructureToPtr() to OPENFILENAME structure for p1.

Note: The above APIs are supported by tGetFile.dll v4.1 and higher.

3. Download tGetFile SDK (Approx. 100KB)

tGetFile SDK is a shareware. License condition is written in a distributed file. Read the condition before using tGetFile SDK.

In the case of developing software by EVT 3.0, you are able to continue to use tGetFile SDK 3.0 (previous version) safely without any problem. The interface between tgetfile.lib and tGetFile.dll has not been changed.

4. Purchase tGetFile SDK

Screenshot for tGetFile.dll
tGetFile for Smartphone

Note:

  1. Existing tGetFile SDK customers of previous versions can use SDK ver 4.x without any additional fee.
  2. Smartphone version is included in ver 4.x, and the following price includes both Pocket PC version and Smartphone version.

The full version of tGetFile SDK consists of the following two editions.

  1. tGetFile SDK Standard Edition

    The full version of tGetFile SDK, that is, a header file and static libraries which will not raise any trial prompt for tGetFile SDK. Still distribution license of individual dll files of tGetFile.dll is not granted. So that the end customer should download tGetFile.dll from Tillanosoft.com.

    Standard Edition should be purchased per developer basis.

  2. tGetFile SDK Professional Edition

    In addition to the Standard Edition above, distribution license of individual dll files of tGetFile.dll is granted. All dll files will be provided including Pocket PC version and Smartphone version. You can create your own installer which will install dll files of tGetFile.dll integrated with the installation process of your own program. tGetFile.dll will not be visible to the end customer so that the end customer may feel that tGetFile file dialog is just a part of your program.

    Tillanosoft will continue to provide you with the latest version of individual dll files of tGetFile.dll at least for a year.

    Professional Edition should be purchased per organization basis.

Please be aware that the Standard Edition is per developer basis while the Professional Edition is per organization. Still, Professional Edition contains one Standard Edition license. The two editions can be purchased in combination. For example, in the case your organization has 10 developers who will use tGetFile SDK, and your organization are going to distribute tGetFile.dll integrated with your own product, 1 Professional Edition and 9 Standard Editions are required.

The prices for full versions are as follows:

EditionPricePurchase
tGetFile SDK Standard Edition$29.99 Add to Cart
tGetFile SDK Professional Edition$159.99 Add to Cart

5. Support

Support is not included in any edition of tGetFile SDK. If you need support to tGetFile SDK or tGetFile.dll, please contact me at the following address:

6. Changes

See the tGetFile.dll page for its changes.

4.3 2005.8.6 Nothing changed for SDK. Just the dll has changed.
4.2 2004.9.24 Nothing changed for SDK. Just the dll has changed.
4.1 2004.7.20 Nothing changed for SDK. Just the dll has changed. 4.0 2003.8.29 Smartphone version has been added. 3.0 2002.4.15 Palm-size PC (CE 2.0) version has been retired. 2.2 2001.11.16 Nothing changed for SDK. Just the dll has changed.
2.1 2001.6.24 Nothing changed for SDK. Just the dll has changed.
2.0 2001.6.20 Nothing changed for SDK. Just the dll has changed.
1.2 2001.6.1 Libs for PsPC 2.11 for EVT 3.0 has been added.
1.1 2001.5.24 Link error fixed 1.0 2001.5.16 The first version

Windows CE Home Tillanosoft


You can create a hyper link to this page freely.