"Savas Ates" <> wrote in message
news:...
> i wrote this class in VB
>
>
> Public Function toplama(x, y)
> z = x + y
> toplama = z
>
> End Function
>
> ***********class name= toplama************ and projectname= project1
>
> from file--> make dll and occurred ilim.dll
>
> run cmd regsvr32 ilim.dll i typed and it was registered..(succesfully)
>
>
> in my asp page
>
> <%
> Set objName = Server.CreateObject("Project1.toplama")
> objName.toplama x,y
>
> objName.x=10
> objName.y=10
> response.write objName
>
> %>
>
> Error Type:
> Microsoft VBScript runtime (0x800A01B6)
> Object doesn't support this property or method: 'objName.x'
> /app/dll.asp, line 5
>
>
> what is the wrong help me. this the first time i use a dll and i think i
> have some mistakes..
>
>
The error message hits the nail on the head - the object has no property
called 'x'.
Your code should read something like this:
Set objName = Server.CreateObject("Project1.toplama")
Response.Write objName.toplama(10,10)
Or a longer version:
Set objName = Server.CreateObject("Project1.toplama")
x=10
y=10
z=objName.toplama(x,y)
Response.Write z
hth
Chris
|