MarshallSoft DUN Dialer
Library for dBase

Programmer's Manual


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 :

web :

MarshallSoft is a member of the Association of Shareware Professionals

MARSHALLSOFT is a registered trademark of MarshallSoft Computing.


1 Introduction
1.1 Documentation Set
1.2 Example Program
1.3 Installation
1.4 Uninstalling
1.5 Ordering
1.6 Updates
2 Compiler Issues
2.1 dBase Versions
2.2 INCLUDE Files
2.3 Compiling and Linking Programs
2.4 Key Codes (License Key)
3 Example Programs
4 Revision History

1 Introduction

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:

  1. MDD4DB is a standard Windows DLL (NOT an OCX or ActiveX control) and is much smaller than a comparable OCX or ActiveX control.
  2. MDD4DB does NOT depend on ActiveX or Microsoft Foundation Class (MFC) libraries or similar "support" libraries.
  3. The MDD4DB functions can be called from applications not capable of using controls.

Refer to for the latest version of this software.

1.2 Documentation Set

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.

1.3 Example Program

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:


     ? "MDDVER 7/1/2002"

     Code = mddAttach(MDD_KEY_CODE)
     if Code < 0
       ? "Cannot attach MDD"
       * 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()
     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.

1.4 Installation

  1. Before installation of MDD4DB, your Visual dBase compiler (any 32-bit version) should already be installed on your system and tested.

  2. Unzip MDD4DB21.ZIP (or MDDxxxx.ZIP where xxxx is your Customer ID) using PKUNZIP, WINZIP, or PKZIP for Windows.

  3. Run the WISE installation program, SETUP.EXE, which will install all MDD4DB files, including copying MDD32.DLL to your Windows directory. No Windows system files are modified.

  4. You're ready to compile and run! For a quick start, load project file MDDVER.PRG

Note that the Windows registry is not modified by the install process.

1.5 Uninstalling

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.

1.6 Ordering

See the Section _1.4 "Ordering" in the MDD User's Manual (MDD_USR) for details on ordering.

1.7 Updates

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

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.

2 Compiler Issues

2.1 INCLUDE Files

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.

2.2 Compiling dBase Programs

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.

2.3 Compiling dBase Projects

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".

2.4 Creating Executables

Executables can be created from Visual dBase forms by compiling using "COMPILE" following by creating the executable by using "BUILD".

3 Example Programs

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.

3.2 DIAL

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

3.3 FLY

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:

4 Revision History

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 for the latest version of this software.