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.
![]() |
| tGetFile File Dialog |
![]() |
| tGetFile Folder Dialog |
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.
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:
| Field name | Support status | Note |
| lStructSize | * | tGetFile.dll does not access this field but it may bring no problem. |
| hwndOwner | o | |
| hInstance | * | tGetFile.dll does not access this field but it may bring no problem. |
| lpstrFilter | o | |
| lpstrCustomFilter | x | Not supported by CE. |
| nMaxCustFilter | x | |
| nFilterIndex | o | |
| lpstrFile | o | 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. |
| nMaxFile | o | |
| lpstrFileTitle | o | Supported by v3.0 |
| nMaxFileTitle | o | |
| lpstrInitialDir | o | |
| lpstrTitle | o | |
| Flags | * | See the next section |
| nFileOffset | Will be supported in future version | |
| nFileExtension | ||
| lpstrDefExt | o |
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.
|
| lCustData | x | Not supported by CE. |
| lpfnHook | x | |
| lpTemplateName | x |
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.
| Flag | Support status | Note |
| OFN_ALLOWMULTISELECT | x | Not supported by CE. |
| OFN_CREATEPROMPT | ||
| OFN_ENABLEHOOK | x | Not supported by CE. |
| OFN_ENABLESIZING | x | |
| OFN_ENABLETEMPLATE | x | |
| OFN_ENABLETEMPLATEHANDLE | x | |
| OFN_EXPLORER | x | Ignored by CE. |
| OFN_EXTENSIONDIFFERENT | ||
| OFN_FILEMUSTEXIST | o | |
| OFN_HIDEREADONLY | ||
| OFN_LONGNAMES | x | Ignored by CE. |
| OFN_NOCHANGEDIR | x | Not supported by CE. |
| OFN_NODEREFERENCELINKS | o | 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_NONETWORKBUTTON | x | Not supported by CE. |
| OFN_NOREADONLYRETURN | x | |
| OFN_NOTESTFILECREATE | x | |
| OFN_NOVALIDATE | x | Ignored by CE. |
| OFN_OVERWRITEPROMPT | o | This flag does not work with Palm-size PC version since the built-in common file dialog ignores this flag. |
| OFN_PATHMUSTEXIST | ||
| OFN_PROJECT | o | Supported by v3.0 |
| OFN_PROPERTY | ||
| OFN_SHOW_ALL | Safely ignored by tGetFile.dll | |
| OFN_READONLY | x | Not supported by CE. |
| OFN_SHAREAWARE | x | |
| OFN_SHOWHELP | x |
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.
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.
![]() |
| tGetFile for Smartphone |
Note:
The full version of tGetFile SDK consists of the following two editions.
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.
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:
| Edition | Price | Purchase |
| tGetFile SDK Standard Edition | $29.99 |
|
| tGetFile SDK Professional Edition | $159.99 |
|
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:
See the tGetFile.dll page for its changes.
4.3 2005.8.6 Nothing changed for SDK. Just the dll has changed.