|
-
Jan 11th, 2001, 06:05 AM
#1
Thread Starter
Hyperactive Member
Hi,
Im trying to develop a component in VB to be used with ASP. Im done compiling the VB project into a dll. But Im stuck here. Is all I have to do next register my dll? If so, thats got to be done on the server right? which happens to be NT. So do i register it using regsvr32???
Thanx a ton.
-
Jan 11th, 2001, 06:10 AM
#2
Lively Member
the dll is registered automatically when you build (make) the dll file (file->make).
to use it in script, you
var objTest = Server.CreateObject ("YourPrjectName.YourClassName")
and then you can:
objTest.Method()
you can also debug it, by running it (F5) on vb,
putting a breakpoint somewhere (F9),
and then call to the asp page using a browser.
try it.
itay.
-
Jan 11th, 2001, 06:15 AM
#3
Thread Starter
Hyperactive Member
thanx itay...but a teeny clarification....
the asp files are stored on a server....im working on another system(where ive created the dll) ...so wont i have to place the dll on the server and register it there????
tried that already but am getting am error
"Server object error 'ASP 0177 : 800401f3'
Server.CreateObject Failed
Invalid class string "
any idea??
[Edited by rammy on 01-11-2001 at 06:27 AM]
-
Jan 11th, 2001, 06:25 AM
#4
Lively Member
oops...
i assumed the web server and the development machine is the same one.
yes, you need to register the dll on the server.
this is very easy.
just put the file on the server (anywhere you want, but i'd use a special folder)
registeration can be done using RegSrv32, but you can just
double click the dll.
the rest is the same.
---
important tip:
as you keep programing dlls, you might have newer versions of the same dll.
so keep one rule in mind, to avoid complication (after all, registration is putting data in the registry, yuo don't want to mess that).
the rule is:
before deleteing a dll, UNregister it (right click on it and select unregister).
----
goodluck
itay.
-
Jan 11th, 2001, 06:30 AM
#5
Thread Starter
Hyperactive Member
thanx a ton itay! will try it.....
-
Jan 11th, 2001, 06:38 AM
#6
Thread Starter
Hyperactive Member
its not quite working....
well, for one right clicking doesnt have an unregister option. any ideas??
Thanx
-
Jan 11th, 2001, 06:44 AM
#7
Lively Member
invalid class string error suggests that the "ProjectName.ClassName" parameter is wrong (on the Server.CreateObject method).
maybe it's because you never registered the dll.
i don't know why right clicking doesn't give you the register/unresiter option.
are you sure you doing it on the dll file?
anyhow, to use regsvr:
regsvr32 FILENAME.DLL
or with /u to unregsiter
regsvr32 /u FILENAME.dll.
still stuck?
-
Jan 11th, 2001, 06:47 AM
#8
Thread Starter
Hyperactive Member
thanx itay! once again...will try it out....
-
Jan 16th, 2001, 05:35 AM
#9
Thread Starter
Hyperactive Member
itay..........
itay.....
have managed to get my asp file running....but Im stuck with
another problem....when I make any changes to the dll file and then try to replace the old dll file existing on the server, I get an error message saying "Cannot delete file. The source or destination files may be in use" ...but Ive
unregistered the old dll before trying to delete it. Any ideas??? as of now Im getting my work done my placing multiple copies...in different folders and then working....
Thanx a ton.
-
Jan 16th, 2001, 06:08 AM
#10
Fanatic Member
Hi rammy
With NT, to make any changes to a dll once it has been registered and used, you have to restart NT. also it is wise to shut down the web-site that accesses it before re-starting.
Yeah, well I'm gonna build my own lunar space lander! With blackjack aaaaannd Hookers! Actually, forget the space lander, and the blackjack. Ahhhh forget the whole thing!
-
Jan 16th, 2001, 06:10 AM
#11
Fanatic Member
and unless your dll is binary compatable, you need to re-register it each time you change it as well
hope this helps
Ian
Yeah, well I'm gonna build my own lunar space lander! With blackjack aaaaannd Hookers! Actually, forget the space lander, and the blackjack. Ahhhh forget the whole thing!
-
Jan 16th, 2001, 06:29 AM
#12
Thread Starter
Hyperactive Member
Is re-starting the server the only way out??? coz Im not sure that I can do that. Thanx a lot anyway, Ianpbaker.
Rammy.
-
Jan 16th, 2001, 06:59 AM
#13
Fanatic Member
unfortunatley with nt4, there is no other way of doing it that I know of.
Ian
Yeah, well I'm gonna build my own lunar space lander! With blackjack aaaaannd Hookers! Actually, forget the space lander, and the blackjack. Ahhhh forget the whole thing!
-
Jan 16th, 2001, 07:01 AM
#14
Thread Starter
Hyperactive Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|