MarshallSoft DUN Dialer
Library for dBase
Programmer's Manual
(MDD4DB)
Version 2.1
July 1, 2002
This software is provided as-is.
There are no warranties, expressed or implied.
Copyright (C) 2002
All rights reserved
MarshallSoft Computing, Inc.
Post Office Box 4543
Huntsville AL 35815
Voice : 1.256.881.4630
FAX : 1.256.880.0925
email : info@marshallsoft.com
web : www.marshallsoft.com
MarshallSoft is a member of the Association of Shareware Professionals
MARSHALLSOFT is a registered trademark of MarshallSoft Computing.
1 Introduction
1.1 Documentation Set2 Compiler Issues
1.2 Example Program
1.3 Installation
1.4 Uninstalling
1.5 Ordering
1.6 Updates
2.1 dBase Versions3 Example Programs
2.2 INCLUDE Files
2.3 Compiling and Linking Programs
2.4 Key Codes (License Key)
4 Revision History
The MarshallSoft DUN Dialer (MDD) is a library of functions that allows your Win32 application program to dial up a local ISP (Internet Service Provider) using any existing DUN (Dialup Network) connection.
See Section 3.0 for details on the example programs.
MDD4DB supports and has been tested with Visual dBase.
MDD4DB can be used with Windows 95/98/Me/XP/NT/2000. The MDD4DB DLL (MDD32.DLL) can also be used from any Win32 application (C/C++, Delphi, etc.) capable of calling the Windows API.
When comparing MDD against our competition, note that:
Refer to http://www.marshallsoft.com/mdd4db.htm for the latest version of this software.
The complete set of documentation consists of three manuals in three formats. This is the first manual (MDD4DB) in the set.
Each manual comes in three formats:
The MDD_4DB Programmer's Manual is the language specific (Visual dBase) manual. All language dependent programming issues such as compiling, compilers and example programs are discussed in this manual. Read this manual first.
The MDD User's Manual (MDD_USR) discusses DUN in general as well as language independent programming issues such as application notes and licensing. Read this manual second.
The MDD Reference Manual (MDD_REF) contains details on each individual MDD function.
Use Microsoft Word 97/99/2000 or Microsoft WordPad to print the document files.
The following example segment demonstrates the use of some of the library functions:
The following example code segment demonstrates the use of some of the library functions:
#INCLUDE KEYCODE.CC
#INCLUDE MDD32.CC
? "MDDVER 7/1/2002"
Code = mddAttach(MDD_KEY_CODE)
if Code < 0
? "Cannot attach MDD"
else
* get MDD version number
Buffer = SPACE(1)
Version = mddDebug(MDD_GET_VERSION, Buffer, 1)
Build = mddDebug(MDD_GET_BUILD, Buffer, 1)
A = int(Version / 256)
Version = Version - (256 * A)
B = int(Version / 16)
C = Version - (16 * B)
? "MDD Version: " + LTRIM(Str(A)) + "." + LTRIM(Str(B)) + "." + LTRIM(Str(C))
? "MDD Build #: " + LTRIM(Str(Build))
* get registration
Buffer = SPACE(50)
Code = mddDebug(MDD_GET_REGISTRATION, Buffer, 50)
? "Registration: " + Left(Buffer,Code)
?
Code = mddRelease()
endif
return? "Cannot attach MDD (check MDD_KEY_CODE)."
In the example program above, mddAttach is called to initialize MDD, and then mddDebug is called to get the version, build, and registration strings..
Lastly, mddRelease is called to perform MDD termination processing and release the Winsock.
Note that the Windows registry is not modified by the install process.
Uninstalling MDD4DB is very easy. MDD does not modify the registry.
First, run UINSTALL.BAT, which will delete MDD32.DLL from your Windows directory, typically C:\WINDOWS for Windows 95/98/Me/XP or C:\WINNT for Windows NT/2000.
Second, delete the MDD project directory created when installing MDD4DB.
See the Section _1.4 "Ordering" in the MDD User's Manual (MDD_USR) for details on ordering.
When you register MDD you will receive a set of registered DLLs plus a license file (MDDxxxx.LIC) that can be used to update your registered DLL's for a period of one year from purchase. Updates can be downloaded from
http://www.marshallsoft.com/oem.htm
After one year, your license must be updated if you want to be able to download updates. Your license can be updated for $20 if ordered within one year from the original purchase (or previous update). After one year, licenses can be updated for $30.
Note that the registered DLL's never expire.
All example programs include two files; KEYCODE.CC and MDD32.CC. The file MDD32.CC contains all the necessary constants and function declarations for MDD4DB, while the file KEYCODE.CC contains your key code, as discussed in Section 2.6 below.
The files KEYCODE.CC and MDD32.CC should all be copied to your VDB compiler's INCLUDE directory.
Visual dBase programs end with the extension ".PRG". Before compiling any of the example programs, edit each file with your Internet TCP/IP parameters as specified in the MDD User's Manual (MDD_USR). Programs can be edited within any text editor, and compiled from the VDB (Visual dBase) command window with the COMPILE command (e.g.: COMPILE DIAL.PRG) or executed from the VDB command window with the DO command (e.g.: DO DIAL.PRG).
To open a program within Visual dBase source editor, choose "File", then "Open". When the "Open File" dialog box appears, choose "Programs" for "Files of Type", then choose the program (*.PRG) to open. Lastly, choose "Open in Source Editor" for "Action" and push the "Open" button.
After editing the source program with your internet (or TCP/IP) parameters, you are ready to compile. From the dBase menu bar, choose "Build", then "Compile". To run choose, "Run". The VDB command window must be displayed in order to see the output.
Visual dBase projects consist of several types of files such as forms, reports, data modules, etc. The project file itself ends with the extension of ".PRJ".
Executables can be created from Visual dBase forms by compiling using "COMPILE" following by creating the executable by using "BUILD".
Several example programs are included in MDD4XB.
Before writing your own programs, compile and run the example programs.
The first example program is the program MDDVER (MDD Version) which displays the MDD library version number and registration string.
The DIAL example program demonstrates how to use DUN (Dialup Networking) to dial up an ISP (Internet Service Provider). After starting DIAL, the first five DUN connections will be displayed, and the first entry will be used for dialing
The FLY example program operates like DIAL except that DUN parameters (user, password, and phone) are specified by the programmer. There must be at least one entry already defined, although it is not used (rather, it is "borrowed"). Edit FLY with your user name, password, and phone number before compiling. Then, compile with:
The MarshallSoft DUN Dialer (MDD32.DLL) is written in ANSI C. All language versions of MDD use the same MDD32.DLL.
Version 2.1: July 1, 2002.
Refer to http://www.marshallsoft.com/mdd4db.htm for the latest version of this software.