Postcode Lite Software providing Royal mail PAF data

Programmers SDK : Basics

To create an instance of the SDK in Visual Basic, using Late Binding, we use:

Dim PostCodeLite As Object

Set PostCodeLite = CreateObject("IPostCodeLite.PostCode")

This instance can then be used, with the functions which are explained on the relevant SDK help pages.

Once finished with the instance should be destroyed using

Set PostCodeLite = Nothing

 

Early binding can also be used by making a reference to IPostCodeLite

Other functions

Function : GetVersion(DataPath as string) as string

This returns Version number of the COM Object.

Function : GetLicenseInfo(DataPath as string) as string

This returns License status and age of local based data.  This should be displayed in a large text box, since it may be 20, plus lines.

Function : OverideComputerName(ComputerName as string)

Use to set computer name if used on web site, but for internal use.  You must uniquely identify each user of the system, normally the COM Object does this for you.  But if running on a Web server then you program will have to identify each user and pass ID to COM object when calling for an address.

Function : DisplayWebPage(URL as string)

Displays a web page in browser

Function : GetDataFromHTTPRequest(URL as string) As String

Gets contents of web address

Function : FormatPostCode(ByVal PostCode as string) As String

Format a Postcode

Function : GetDistance(Latitude1 As Double, Longtitude1 As Double, Latitude2 As Double, Longtitude2 As Double) As Double

Get the distance in kilometres between two co-ordinates.

Function : OpenAnAccountAndLinkToResellerForInternalUse(ResellerID as long)

Function : OpenAnAccountAndLinkToResellerForWebUse(ResellerID as long)

Function : OpenAnAccountAndLinkToResellerForWebAndInternalUse(ResellerID as long)

This function takes the user to our web site, to create an account with us.  After creation the system will send them an e-mail with the appropriate data key for Internal use or Web use or both.

These accounts can be linked to a reseller, which should be set to 0.

     
Postcode Lite is brought to you by ComTek Accounts Ltd