Advertisement

There's no such thing as a stupid question, but they're the easiest to answer.
Login
Search

Advertisement

Software Development Software Development
Search Search
Search for:
Tech Support Guy > > >

vbSendMail -- convert for ActiveX usage


(!)

asbo's Avatar
asbo asbo is offline
Senior Member with 507 posts.
THREAD STARTER
 
Join Date: Sep 2001
Location: who really knows anymore?
Experience: Advanced
01-Jun-2002, 09:23 AM #1
vbSendMail -- convert for ActiveX usage
Ok, inder the direction of TimCottee, I have downloaded the vbSendMail DLL, only to find that that code provided in the documentation is not compatiable with the ActiveX components. Can anyone help me here?? The DLL is available at http://www.freevbcode.com/ShowCode.Asp?ID=109

Thanks again
IMM's Avatar
IMM IMM is offline IMM is authorized to help remove malware.
Malware Removal Specialist with 3,259 posts.
 
Join Date: Feb 2002
01-Jun-2002, 06:54 PM #2
From their docs:
---------------------------
If you get the error "Run time error 429: ActiveX component can't create object" when you run your application, the vbSendMail.dll either is not installed or not properly registered. Verify that the file is installed and manually run regsvr32.exe to register the dll. If you get a "LoadLibrary ("vbSendMail.dll") failed" message, check for a missing or incorrect version of the mswinsck.ocx. It has been reported that in some rare cases, manually registering the component does not resolve this issue. In those cases, building an installation package with the Package and Deployment Wizard, has solved the problem
--------------------------
You are using VB6 and not vb5? If vb6 what service pack level?
What version of mswinsock.ocx do you have?

You did register it with regsvr32 ??
c:\windows\system\RegSvr32.Exe  <Path>\vbSendMail.Dll

What exactly is the error message??
asbo's Avatar
asbo asbo is offline
Senior Member with 507 posts.
THREAD STARTER
 
Join Date: Sep 2001
Location: who really knows anymore?
Experience: Advanced
01-Jun-2002, 11:02 PM #3
Where I stand...
Ok, heres where I stand:

*This is designed to work on a webpage*

I created my project, and later a module to go with the vbSendMail function, and when I add the code

Private WithEvents poSendMail As vbSendMail.clsSendMail

and run, it returns the error:

Compile Error:

User-type not defined.

Everything else appears to work fine, but I am unable to get past this, and I am not sure even why this comes up.

*cough* *cough* newby



In response to your post IMM, my version of VB6 is same as install level, what ever that, I suppose SP0 . As for registering it with the system, I see no point because this is, as mentioned above, supposed to work on a webpage, and if I can get it to work without any shimnanigans, all for the better. And, according Windows, mswinsock.dll does not exist. Unless I can be guarunteed that all of the visitors will have this, I'd really hope to find some alternate way of using it, hosting it at the site, maybe.

Please forgive me for anything that is blantly not possible, I do not have much experience with internet-related programming, in fact, I have none before this.
TimCottee's Avatar
TimCottee TimCottee is offline
Member with 186 posts.
 
Join Date: Oct 2001
Location: Southampton, England
06-Jun-2002, 06:42 AM #4
asbo:

You generally need to register an activex dll with the system on which it is going to run. Now there is an exception to this in that you can just include the dll in the same folder as the application's executable and it will be found without having to be registered. It still needs to be declared in the project's references. If you are getting a compile error it is the latter that is the most likely cause. Open the References dialog and make sure that the vbSendMail component is checked. If it is not then this explains the error.

As I understand what you are trying to do, with an ASP interface you would expect the vbSendMail dll to be installed and registered on the webserver rather than the client and use your submit process to send the appropriate information to your dll on the webserver that then uses the sendmail one to actually send the message. Is this right or have I misunderstood?
asbo's Avatar
asbo asbo is offline
Senior Member with 507 posts.
THREAD STARTER
 
Join Date: Sep 2001
Location: who really knows anymore?
Experience: Advanced
06-Jun-2002, 02:00 PM #5
Yes, that is what I am trying to do, TimCottee, and thanks for your help.
asbo's Avatar
asbo asbo is offline
Senior Member with 507 posts.
THREAD STARTER
 
Join Date: Sep 2001
Location: who really knows anymore?
Experience: Advanced
06-Jun-2002, 08:54 PM #6
Hmm... I did as you suggested and still in the string

Private WithEvents poSendMail As vbSendMail.clsSendMail

upon running/debigging, VB highlights WithEvents and gives a

Compile Error:

Only valid in object module.


Any idea what this means??
IMM's Avatar
IMM IMM is offline IMM is authorized to help remove malware.
Malware Removal Specialist with 3,259 posts.
 
Join Date: Feb 2002
06-Jun-2002, 10:01 PM #7
Without knowing a great deal more about what you are doing, it's tough to say, but perhaps:
Q237286 - BUG: Event Does Not Fire in the IDE When Raised from Inside a Compiled Modal Form
http://support.microsoft.com/support.../Q237/2/86.ASP
or
http://support.microsoft.com/support.../Q177/9/96.ASP

Have you tried it compiled?

What happens if you simply remove WithEvents from it?

Last edited by IMM; 07-Jun-2002 at 02:20 AM..
TimCottee's Avatar
TimCottee TimCottee is offline
Member with 186 posts.
 
Join Date: Oct 2001
Location: Southampton, England
07-Jun-2002, 02:43 AM #8
An object module is either a "class module", "form", "usercontrol" etc, a standard module is not by definition an object module and therefore you cannot use WithEvents within it. In order to do this you would be better off creating a simple class module and using this.
asbo's Avatar
asbo asbo is offline
Senior Member with 507 posts.
THREAD STARTER
 
Join Date: Sep 2001
Location: who really knows anymore?
Experience: Advanced
07-Jun-2002, 04:57 PM #9
Ok, following TimCottee's suggestion, I added a Class Module and removed the normal module. Now when I run it, in the string

Set poSendMail = New clsSendMail

the debugger highlights Set and claims:

Compile Error:

Invalid outside procedure.



Just so that everyone will know, I am about to install SP5 for VB 6.0 and see if that helps anything.


Thanks for all your help.
asbo's Avatar
asbo asbo is offline
Senior Member with 507 posts.
THREAD STARTER
 
Join Date: Sep 2001
Location: who really knows anymore?
Experience: Advanced
09-Jun-2002, 07:34 PM #10
Just a note...
SP5 didn't make any difference.
asbo's Avatar
asbo asbo is offline
Senior Member with 507 posts.
THREAD STARTER
 
Join Date: Sep 2001
Location: who really knows anymore?
Experience: Advanced
14-Jun-2002, 01:13 PM #11
Can anyone help?
briankm's Avatar
briankm briankm is offline
Junior Member with 7 posts.
 
Join Date: Jun 2002
14-Jun-2002, 04:27 PM #12
asbo,

Post or e-mail me the code and I will have a look.....


Brian
========
brian@game-editing.net
asbo's Avatar
asbo asbo is offline
Senior Member with 507 posts.
THREAD STARTER
 
Join Date: Sep 2001
Location: who really knows anymore?
Experience: Advanced
14-Jun-2002, 04:42 PM #13
Do you want the entire project or just for Command1?
briankm's Avatar
briankm briankm is offline
Junior Member with 7 posts.
 
Join Date: Jun 2002
15-Jun-2002, 08:02 PM #14
asbo,

I have sent a small VB project --let me know how it works for you...

Brian
asbo's Avatar
asbo asbo is offline
Senior Member with 507 posts.
THREAD STARTER
 
Join Date: Sep 2001
Location: who really knows anymore?
Experience: Advanced
15-Jun-2002, 08:49 PM #15
Will do.

Thanks much.
As Seen On

BBC, Reader's Digest, PC Magazine, Today Show, Money Magazine
WELCOME TO TECH SUPPORT GUY!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.


(clock)
THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


WELCOME
You Are Using: Server ID
Trusted Website Back to the Top ↑

Content Relevant URLs by vBSEO 3.3.2