Round TLRSWP Logo TLRSWP Banner Image
Home
News
Products
Updates
Support
EmailDLL
Manual
FAQ
General
Install
Integrate
Class Use
DLL Use
Messages
Debug
Debug
DocBox
Contacts
Company
Site Map

EmailDLL Using the DLL Directly FAQs

Click here for more information on EmailDLL This page has answers to FAQs dealing with Directly Accessing The DLL. The other categories available are: General Information, EmailDLL Installation, Integration with your application, Email Class, Creating and Sending Messages, and Troubleshooting.
 

What files are needed for direct DLL access?
We recommend that you install the EmailDLL in its own directory, and copy the necessary files into the forms directory of your application. If you store them elsewhere, you will have to ensure your extern references are correct. The appropriate files are:

  • email100.dll the email DLL file
  • DLLdefines100.js Operator codes and extern declarations
  • shrlk20.dll the license authorization DLL
  • emaildll100.hlp windows help file (optional)
  • emaildll100.cnt windows help contents file (optional)
  • email_defines100.js email errors and messages (optional)

The help files are only needed if you plan to access the online manuals from the debugging log window. If you do plan to access them in this manner, place them inside the Borland IntraBuilder install directory. For example, C:\Borland\IntraBuilder.

Why can't IntraBuilder find the DLL?
In order to use the DLL directly, you must provide extern declarations for each function you intend to use. The file DLLDefines100.js contains copies of these for your use. At the end of each extern declaration is the location and name of the DLL file. If IntraBuilder cannot locate the DLL file, then you need to check those extern statements. Remember, if the extern statements use relative file locations, then you need to ensure the DLL can be found from the application's current directory at the time the extern statement is encountered.

Where can I find the operator definitions?
You can look in the file named DLLDefines100.js, which will be present in the installation directory. This file also contains extern declarations for the DLL functions.

How do I choose a good handle value?
If you are choosing the handle yourself, that value must be unique to any other email object which might be accessing the same copy of the DLL. Remember, each IntraBuilder user agent loads its own copy of the DLL.

Although the Email class limits the system to one single Email object open at a time in a user session, there is no worry of collisions. The Email class uses the netInfo.SessionID value provided by IntraBuilder.

If you must have multiple email objects concurrently open within a single user session, you must find a value that will be unique among all user sessions, as well as being unique within its own user session.

If you want your forms to work correctly inside the IntraBuilder designer, you'll have to do a little more work. Since there is no sessionID created for a form running in the designer, you need to come up with some other number. The Email class uses a random integer between 1 and 32768 when it detects it is running in the designer. For more information, look in the source code file Email100.js.

What do these error codes mean?
EmailDLL produces two categories of error codes. All of them are negative values returned by the Email class. Numbers from -1 down to -9999 are reserved for the EmailDLL itself. Zero represents success. Version 1.0 only generates error values from -1 to -16. At this site, you can view a complete listing of the EmailDLL error messages.

The EmailDLL also returns Windows Sockets errors that are discovered by various functions inside EmailDLL. These can be distinguished because they are all negative numbers less than 10000. At this site, you can view a complete listing of the Winsock error messages.

You can convert an error value into an American English text string with the Email.GetErrorString() method.

 


Copyright 1998, TLR Software Publishing
Questions? Comments? Invective?