473,583 Members | 2,878 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

problems calling ActiveX control inside VB OCX from ASP

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.myClien t
Set smtpClient = New SEACOMSMTPLib.S eaSMTPObj

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.S eaSMTPObj

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

Jul 19 '05 #1
0 3573

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2223
by: Mattt | last post by:
Hi, I've run into a rather odd problem. get Methods seem to return values from the wrong methods! For example, let's pretend my activex control stores values about a person. getName would return their age, while getAge might return null! Something is also going wrong with my method that accepts input and returns a value (okay, it is a money...
14
2307
by: Jim Hubbard | last post by:
Are you up to speed on the difficulties in using the 1.1 .Net framework? Not if you are unaware of the 1,596 issues listed at KBAlertz (http://www.kbalertz.com/technology_3.aspx). If you are going to use .Net......I highly recommend signing up for the free KBAlertz newsletter at http://www.kbalertz.com/default.aspx. Looking at all of the...
1
1413
by: Lucia | last post by:
I'm working at .NET project to implement a COM interface for a .NET control. The .NET assembly is built with the correct license for the control. Some unmanaged code is creating an instance of the control, inside an MFC dialog. When the control is used inside a WinForm dialog, the license is correctly validated and everything works.
8
1537
by: Alex | last post by:
Hello, I am trying to access some windows components from a web based application and I am having trouble find my way. The only solution seems to be to creat an ActiveX control to access the local com objects. My problem is that I have been primaraly working in C# and too time consuming to go back and re-learn VC++ to creat those controls I...
17
2466
by: Lloyd Sheen | last post by:
This IDE is driving me nuts. I needed another button so I copied an existing one, changed the Text and the id and position by drag and drop. Well then I run and get the following: Control 'Button19' of type 'Button' must be placed inside a form tag with runat=server Can the IDE not do what it is supposed to do. It seems that it is a...
9
1632
by: John F | last post by:
This is a re-post of an earlier problem which I have not been able to solve yet. I'm running .NET 2003 on XP. I am trying to launch a Windows program from a VB Web app. The code I am using is; Try Dim psi As New System.Diagnostics.Process psi.StartInfo.UseShellExecute = True psi.StartInfo.WorkingDirectory = "c:\" psi.StartInfo.FileName...
2
4482
by: pagates | last post by:
Hello All, I have created a C# project that sets "Register for COM Interop" to true, and sets the ProgId and Guid attributes for the class. I then use this control inside VB6. This all works correctly on my development machine (oh no, one of those!), creating a DLL and a tlb on each compile, and setting the entries in the registry. It...
6
8037
by: hufaunder | last post by:
I have an ActiveX component that I want to use in a library that I am writing. As a first test I used the ActiveX component in a windows form application. Adding the component created: Ax.dll .dll I can not call the functions in the ActiveX component. In the next step I tried to use the ActiveX component in a class library. I simply...
0
1330
by: vut.wong | last post by:
Hi, I would like to get use my activex control inside Cdialog in beginthreadex When I used Cdialog and activex control , everything is fine but when i put it inside thread (beginthreadex), it doesn't work anymore. I can use Cdialog without activex control inside thread and it works
0
7811
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8159
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8314
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7922
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8185
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
3811
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3836
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1416
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1147
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.