Results 1 to 2 of 2

Thread: confused by code

  1. #1

    Thread Starter
    Member
    Join Date
    May 2000
    Location
    London, UK
    Posts
    39

    Cool

    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.




  2. #2
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    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.

    Code:
    Option Explicit
    
    Public Function multiply(ByVal x, ByVal y)
    
    multiply = x * y
    
    End Function
    in the active server page:

    Code:
    <%@ Language=VBScript%>
    <%
    
    dim obj 
    
    set obj = server.CreateObject("raj2000.class1")
    
    Response.Write obj.multiply(100,3)
    
    set obj = nothing
    %>
    This all works!

    Mark
    -------------------

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width