dll help

S

Savas Ates

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..
 
C

CJM

Savas Ates said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top