PDA

Click to See Complete Forum and Search --> : confused by code


raj2000
Jun 7th, 2000, 06:22 PM
Hi,

I would like to know if the following piece of code is correct.


<% LANGUAGE= "VBScript" %>

<%

Const SESN_GEO = "GEO_SESSION"

Function CallGeo(ByVal Lat, ByVal Lon, ByVal Map)

CallGeo=Session(SESN_GEO).GEOMANCODE(Lat,Lon,Map)


End Function
%>

Is the code within the above function correct , if not what do I need to do to alter it.

Mark Sreeves
Jun 7th, 2000, 06:46 PM
This is becoming horrendous!

Start at the begining.

your ActiveX DLL needs to contain public functions with the parameters declared byval


this is in class1 of project raj2000

compile it up to raj2000.dll in your system or system32 directory.



Option Explicit

Public Function multiply(ByVal x, ByVal y)

multiply = x * y

End Function


in the active server page:



<%@ Language=VBScript%>
<%

dim obj

set obj = server.CreateObject("raj2000.class1")

Response.Write obj.multiply(100,3)

set obj = nothing
%>


This all works!