Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: ASP & DLL's


Message #1 by jstmehr4u3@a... on Thu, 07 Mar 2002 23:49:06 +0000
To send Mail using ASP you can use Cdonts by this:

set objNewMail = server.createobject("CDONTS.NEWMAIL")



So this instantiates the DLL CDONTS. But what the hell 

is NEWMAIL? Is that just a function in that DLL?



I am trying to write a DLL that validates a user login. 



My DLL Project Name is:

projValidateUser



My CLS Name is:

ValidateUser



My Function Name is:

ValidateUserByUserNameandPassword() as Boolean



So when I go to my ASP page, and try to instantiate that 

DLL I use:



Set objValidate = server.createobject

("ValidateUser.ValidateUserbyUsernameandPassword")



if objValidate() = True then

blah blah

else

blah blah

end if



Now, after compiling the DLL I RUN:

regsvr32 c:\Code\dlls\validateuserlogin\validateuser.dll



But I seem to be getting this error when I view my ASP 

page:

Server object, ASP 0177 (0x800401F3)

Invalid ProgID. For additional information specific to 

this message please visit the Microsoft Online Support 

site located at: 

http://www.microsoft.com/contentredirect.asp. 





ANY IDEAS?



Mike Scott

Message #2 by "phil griffiths" <pgtips@m...> on Fri, 8 Mar 2002 10:49:09
NEWMAIL is a class within the CDONTS DLL.  DLLs can contain multiple 

classes so you need to specify the one you want.

The progid is ProjectName.ClassName, so you need to amend your 

createobject to:



Set objValidate = server.createobject("projValidateUser.ValidateUser")

If objValidate.ValidateUserbyUsernameandPassword() Then

  blah

Else

  blah

End If



BTW you don't have to run regsvr after compiling a dll in vb, the reg is 

done for you.



HTH

Phil

> To send Mail using ASP you can use Cdonts by this:

> set objNewMail = server.createobject("CDONTS.NEWMAIL")

> 

> So this instantiates the DLL CDONTS. But what the hell 

> is NEWMAIL? Is that just a function in that DLL?

> 

> I am trying to write a DLL that validates a user login. 

> 

> My DLL Project Name is:

> projValidateUser

> 

> My CLS Name is:

> ValidateUser

> 

> My Function Name is:

> ValidateUserByUserNameandPassword() as Boolean

> 

> So when I go to my ASP page, and try to instantiate that 

> DLL I use:

> 

> Set objValidate = server.createobject

> ("ValidateUser.ValidateUserbyUsernameandPassword")

> 

> if objValidate() = True then

> blah blah

> else

> blah blah

> end if

> 

> Now, after compiling the DLL I RUN:

> regsvr32 c:\Code\dlls\validateuserlogin\validateuser.dll

> 

> But I seem to be getting this error when I view my ASP 

> page:

> Server object, ASP 0177 (0x800401F3)

> Invalid ProgID. For additional information specific to 

> this message please visit the Microsoft Online Support 

> site located at: 

> http://www.microsoft.com/contentredirect.asp. 

> 

> 

> ANY IDEAS?

> 

> Mike Scott

Message #3 by "Rainery, Kim" <Kim.Rainery@w...> on Mon, 11 Mar 2002 08:49:18 -0600
Mike,



Try clearing your registry of all instances of your dll. It sounds like you

have multiple instances registered in your registry. Visual Basic does this.

I just had this

same problem only I could not get a new function to show up in the dll that

is error I received.



go to regedit and search on the name of your dll and clear the values of

every instance then re-make your dll.



Hope this works for you.

Kim



-----Original Message-----

From: ASP Web HowTo digest [mailto:asp_web_howto@p...]

Sent: Friday, March 08, 2002 6:03 PM

To: asp_web_howto digest recipients

Subject: asp_web_howto digest: March 08, 2002





-----------------------------------------------

When replying to the digest, please quote only

relevant material, and edit the subject line to

reflect the message you are replying to.

-----------------------------------------------



The URL for this list is:

http://p2p.wrox.com/list.asp?list=asp_web_howto



ASP_WEB_HOWTO Digest for Friday, March 08, 2002.



1. ASP & DLL's

2. Re: inserting multiple records

3. Re: How To Get The Mac-Address

4. Re: Detect font and add new font to computer from ASP

5. Re: RES: A point in the right direction

6. Re: ASP & DLL's

7. FW: index server

8. index xerver and propertie Vpath is not in properties of my directories

9. CDO and Task Messages, Help



----------------------------------------------------------------------



Subject: ASP & DLL's

From: jstmehr4u3@a...

Date: Thu, 07 Mar 2002 23:49:06 +0000

X-Message-Number: 1



To send Mail using ASP you can use Cdonts by this:

set objNewMail = server.createobject("CDONTS.NEWMAIL")



So this instantiates the DLL CDONTS. But what the hell 

is NEWMAIL? Is that just a function in that DLL?



I am trying to write a DLL that validates a user login. 



My DLL Project Name is:

projValidateUser



My CLS Name is:

ValidateUser



My Function Name is:

ValidateUserByUserNameandPassword() as Boolean



So when I go to my ASP page, and try to instantiate that 

DLL I use:



Set objValidate = server.createobject

("ValidateUser.ValidateUserbyUsernameandPassword")



if objValidate() = True then

blah blah

else

blah blah

end if



Now, after compiling the DLL I RUN:

regsvr32 c:\Code\dlls\validateuserlogin\validateuser.dll



But I seem to be getting this error when I view my ASP 

page:

Server object, ASP 0177 (0x800401F3)

Invalid ProgID. For additional information specific to 

this message please visit the Microsoft Online Support 

site located at: 

http://www.microsoft.com/contentredirect.asp. 





ANY IDEAS?



Mike Scott



----------------------------------------------------------------------



Subject: Re: inserting multiple records

From: "Ken Schaefer" <ken@a...>

Date: Fri, 8 Mar 2002 11:01:30 +1100

X-Message-Number: 2



Firstly, if you are trying to track times, then store the times as date/time

fields, not as varchar fields.

You could then store just the start, and end time for each booking. This

makes it very easy to see (for example) how much time as been allocated to

each user/project etc.



In terms of your second question, I'd do the following:



a) create an array of existing bookings (eg using objRS.GetRows)

b) create an array of all possible booking slots

c) loop through the array in (b), and see if there is an element in (a) that

overlaps. If so, that slot is unavailable. If not, then the slot is

available.



Cheers

Ken



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

From: "Jean Halstad" <J_Halstad@S...>

Subject: [asp_web_howto] inserting multiple records





: I don't know how to tackle this. Am creating a meeting room booking form.

: Users can book the room in half hour blocks.

:

: I have created as SQL DB field called "timeBlock" as varchar, written as

: "0900-0930" for example. Each record contains date, room name and the time

: block booked. I have written a query which writes to an HTML table the

time

: blocks which have been booked on a certain date, with a checkbox beside

each

: one to enable the user to delete the booking/s. So far so good.

:

: I now want to offer the user the option of booking the time blocks which

are

: not yet booked. I don't know how to write only the unbooked blocks to

: another table. If I write an if or case statement to check for timeblocks

: used, e.g.

:

: if rs("TimeBlock") <> "0930-1000"

:

: only one match is checked for, whereas I may require several. Should I

: create a look up table with all the possible time blocks in it?



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~





----------------------------------------------------------------------



Subject: Re: How To Get The Mac-Address

From: "Ken Schaefer" <ken@a...>

Date: Fri, 8 Mar 2002 11:05:33 +1100

X-Message-Number: 3



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

From: "Rajeev Srivastav" <srivastavrajiv@r...>

Subject: [asp_web_howto] Re: How To Get The Mac-Address





: > hi Friends,

: >   i am in big trouble.How to get the Mac-Address of client machine

: > with out knowing him or entering the Mac-Address in an web based

: > application. I will be great full to all of you

: >   thank you



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Generally you can't (using just TCP/IP).



IP is a node-to-node protocol. Unless you are on the same collision domain

as the originating IP, all you will get is the MAC address of your default

gateway (typically your edge router). Why?



When a user requests a webpage on your webserver, if the webserver is not on

the same collision domain, then the client machine sends the packet to the

configured default gateway. That gateway then repackages the packet with

it's MAC address as the source, and sends it on to its configured default

gateway, and so on until it reaches your webserver.



This is different if the source machine has NBT enabled, and those ports

open, but most companies etc would not route NBT packets beyond their own

networks, and would have firewalls preventing incoming requests.



Cheers

Ken





----------------------------------------------------------------------



Subject: Re: Detect font and add new font to computer from ASP

From: "Ken Schaefer" <ken@a...>

Date: Fri, 8 Mar 2002 11:07:50 +1100

X-Message-Number: 4



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

From: "tom carr" <tomcarr1@y...>

Subject: [asp_web_howto] Detect font and add new font to computer from ASP





: Does anyone know how to use either ASP or client side script to check and

: see if a computer has a particular font installed, and if the font is not

: installed automatically install it ?



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



ActiveX Control or signed VBScript perhaps.



Basically installing a font involves changing the client's computer

configuration. You're not going to be able to do that with straight HTML or

javascript, and you can't do it without the user's permission. You certainly

can't do it with ASP (since that runs entirely on the server).



Cheers

Ken





----------------------------------------------------------------------



Subject: Re: RES: A point in the right direction

From: fishy.productions@n...

Date: Fri, 8 Mar 2002 09:03:50

X-Message-Number: 5



thanks for the help guys.. 



got it working ..



Cheers







> I guesse you are setting your rsNew a String value, which you cannot do.

> Try deleting your second line ** rsNew = "SElect * From (tbl_Message)" **

> 

> Hope this helps

> 

> Mauricio

> -----Mensagem original-----

> De: fishy.productions@n...

> [mailto:fishy.productions@n...]

> Enviada em: quinta-feira, 7 de março de 2002 13:38

> Para: ASP Web HowTo

> Assunto: [asp_web_howto] A point in the right direction

> 

> 

> Please help

> 

> I keep getting the following error

> 

> "Microsoft VBScript runtime error '800a01a8'

> 

> Object required: 'rsNew' "

> 

> Im trying to add to my databse using the following

> 

> Sub AddtoDB

> 	%><!--#include file="connDB.asp"-->

> 		<%

> 		 Set rsNew = Server.CreateObject ("ADODB.Recordset")

> 		 rsNew = "SElect * From (tbl_Message)"

> 		'rsNew.Open "tbl_Message", objConn, adOpenStatic,

> adLockOptimistic, adCmdTable

> 		SQL = "INSERT INTO tbl_Message(txtMessage, link) VALUES

> ('" & Body & "', '" & Link & "')"

> 

>   		rsNew.Open  strSQL, objConn

> 	'rsNew.Close

> 	Set rsNew = Nothing

> 

> 	' close objects

> 		postRS.Close

> 		objConn.Close

> 		Set postRS = Nothing

> 		Set objCOnn = Nothing

> 

> End Sub

> 

> Please help as its driving me insane

> 

> Thanks

> 

> 

> 




> $subst('Email.Unsub').

> 



----------------------------------------------------------------------



Subject: Re: ASP & DLL's

From: "phil griffiths" <pgtips@m...>

Date: Fri, 8 Mar 2002 10:49:09

X-Message-Number: 6



NEWMAIL is a class within the CDONTS DLL.  DLLs can contain multiple 

classes so you need to specify the one you want.

The progid is ProjectName.ClassName, so you need to amend your 

createobject to:



Set objValidate = server.createobject("projValidateUser.ValidateUser")

If objValidate.ValidateUserbyUsernameandPassword() Then

  blah

Else

  blah

End If



BTW you don't have to run regsvr after compiling a dll in vb, the reg is 

done for you.



HTH

Phil

> To send Mail using ASP you can use Cdonts by this:

> set objNewMail = server.createobject("CDONTS.NEWMAIL")

> 

> So this instantiates the DLL CDONTS. But what the hell 

> is NEWMAIL? Is that just a function in that DLL?

> 

> I am trying to write a DLL that validates a user login. 

> 

> My DLL Project Name is:

> projValidateUser

> 

> My CLS Name is:

> ValidateUser

> 

> My Function Name is:

> ValidateUserByUserNameandPassword() as Boolean

> 

> So when I go to my ASP page, and try to instantiate that 

> DLL I use:

> 

> Set objValidate = server.createobject

> ("ValidateUser.ValidateUserbyUsernameandPassword")

> 

> if objValidate() = True then

> blah blah

> else

> blah blah

> end if

> 

> Now, after compiling the DLL I RUN:

> regsvr32 c:\Code\dlls\validateuserlogin\validateuser.dll

> 

> But I seem to be getting this error when I view my ASP 

> page:

> Server object, ASP 0177 (0x800401F3)

> Invalid ProgID. For additional information specific to 

> this message please visit the Microsoft Online Support 

> site located at: 

> http://www.microsoft.com/contentredirect.asp. 

> 

> 

> ANY IDEAS?

> 

> Mike Scott



----------------------------------------------------------------------



Subject: FW: index server

From: "Eric Van Camp" <eric@a...>

Date: Fri, 8 Mar 2002 14:33:14 +0100

X-Message-Number: 7







I try to work with index server sample files, but i always get the problem

that index server gives me the following error "The template file can not be

found in the location specified by 'CiTemplate=' in file

F:\apeiron\scripts\ixtourqy.idq. " although i created a virtual directory

"script" beneath in my website, with the file ixtourqy.idq file in it..

anyone an idea what i do wrong?



Eric Van Camp

apeiron

Trolieberg 74

3010 Kessel-lo

t:016/35.69.99

f:016/35.57.90

mobile:0479/598.599





----------------------------------------------------------------------



Subject: index xerver and propertie Vpath is not in properties of my

directories

From: "Eric Van Camp" <eric@a...>

Date: Fri, 8 Mar 2002 14:44:28 +0100

X-Message-Number: 8



the name Vpath does not appear as a propertie of my catalog i made...so i

wonder were it is gone...can anyone suggest?



Eric Van Camp

apeiron

Trolieberg 74

3010 Kessel-lo

t:016/35.69.99

f:016/35.57.90

mobile:0479/598.599





----------------------------------------------------------------------



Subject: CDO and Task Messages, Help

From: Bernard Beegle <BBeegle@m...>

Date: Fri, 8 Mar 2002 13:55:43 -0500

X-Message-Number: 9



Can anyone help or show me where good documentation for CDO is located?  I

am working with CDO 1.21 in Visual Basic.  I am generating task messages on

the Exchange Server with IPM.Task for the message type.  I would like to set

the "Due Date', "Start Date", "Status", "Priority", "Reminder" and "Owner"

properties for the email.  Thank you.



> 	Rob Limlaw

> 	Software Engineer

> 	Multilink Technology, Corp.

> 	(732) 537-5204

> 	RLimlaw@m...

> 

> 







---



END OF DIGEST






$subst('Email.Unsub').


  Return to Index