problems calling ActiveX control inside VB OCX from ASP

G

Gary

sorry for not cross-posting originally (originally posted in the components
subgroup)

I seem to have run into two documented bugs whose workarounds are
incompatible. What I have is an OCX written in VB 6 that has a few classes
in it. Many of the methods of the OCX are used by ASP, and so far have
worked fine.

I recently added a COM object reference to the DLL which consists of an SMTP
client dll that is wrapped up in dual interface activeX control (written in
VC++ 6).

When I try to create an instance of this new control, the compiler
complains.

Dim smtpClient As myClass.myClient
Set smtpClient = New SEACOMSMTPLib.SeaSMTPObj

When I try to compile this, I get an error on the first line of code that
accesses a method of the object:

Compiler error: Function or interface marked as restricted, or the function
uses an Automation type not supported in Visual Basic.

When I did a search on this message, I found a MSKB article that this may be
a known bug, with the workaround being to change the original declaration of
the object to be

Dim smtpClient As Object
Set smtpClient = New SEACOMSMTPLib.SeaSMTPObj

this compiles fine, and seems to work from within the OCX. However, when I
try to create this same object in ASP, I get an error

Error 438 : Object doesn't support this property or method

Doing a search on this error, I found another article on MSKB that documents
a bug in VB when using late binding. The solution being to use early
binding. Which was the original cause of all my problems.

Could this have anything to do with the data types in the interfaces, and
the messages are misleading? I was able to invoke all the methods of the
SMTP control from within the OCX and it works fine.

I also tried calling the ActiveX control directly from ASP, and while it
works fine in VB, the object creation fails in ASP with error
438 - Object doesn't support this property or method

Thanks for any advice,

-Gary
 

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

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top