Search Tools Links Login

The Mapquest Code


Ever wanted to offer driving directions from your website instead of settling for a link to just a map? It's easier than you might think, no ASP or CGI involved, just plain old HTML. This also adds a whole new element to your website that's just plain neat.

Original Author: Joe Maddalone

Code

-------------------
VB CODE:
(START A NEW PROJECT, REPLACE THE EXISTING CODE WITH THIS:)
-------------------
Option Explicit
Private Declare Function CountLetters Lib "..delphiproject1.dll" (ByVal Str As String) As Long
Private Sub Form_Load()
Call CountLetters("This is a teststring, passed to a function in a delphi DLL")
End Sub
-------------------
DELPHI CODE
(START A NEW LIBRARY, REPLACE THE EXISTING CODE WITH THIS:)
-------------------
library Project1;
uses
Windows,
SysUtils;
function CountLetters(pData : PChar) : Cardinal; export; stdcall;
var
Handle : Integer;
tMsg : String;
begin
tMsg := 'The string passed by you; "' + pData + '" is counting ' + IntToStr(Length(pData)) + ' letters.';
MessageBoxA(Handle, pChar(tMsg), 'Delphi DLL', MB_OK);
end;
exports
CountLetters name 'CountLetters' resident;
begin
end.

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 82 times

Categories

ASP/ HTML

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.