Boy, bet I'm being a pest now... Well, got the COM interop working, or so I
though. Here's the .NET code in the DLL...
<ComClass(Rythmia.ClassID, Rythmia.InterfaceId, Rythmia.EventsId)> _
Public Class Rythmia
#Region "COM Class IDs"
Public Const ClassID As String = "5F0D4112-B23D-4703-94F5-B5B96E50F3BB"
Public Const InterfaceId As String = "A9DFEE4E-3DBB-4505-BBC6-9BCEE5A220A5"
Public Const EventsId As String = "E6CAB551-4A34-4c4d-83EA-7D3D7E2E49DF"
#End Region
#Region "Events"
Public Event Progress(ByVal Value As Long, ByVal Maximum As Long)
Public Event Status(ByVal StatusMessage As String)
#End Region
Now, in VB6, after I referenced it, I used this:
Private WithEvents Ency As DGRE.Rythmia
Private Sub Form_Load()
Set Ency = New DGRE.Rythmia
End Sub
And I get this when I try to select an Event:
"Function or Interface is marked as restricted, or the function uses an
Automation Type not supported in Visual Basic"
Am I doing something wrong?
Tibby 3 4575
"Tibby" <ti*************@hotmail.com> wrote in message
news:OK**************@tk2msftngp13.phx.gbl... Boy, bet I'm being a pest now... Well, got the COM interop working, or so
I though. Here's the .NET code in the DLL...
<ComClass(Rythmia.ClassID, Rythmia.InterfaceId, Rythmia.EventsId)> _ Public Class Rythmia #Region "COM Class IDs" Public Const ClassID As String = "5F0D4112-B23D-4703-94F5-B5B96E50F3BB" Public Const InterfaceId As String =
"A9DFEE4E-3DBB-4505-BBC6-9BCEE5A220A5" Public Const EventsId As String = "E6CAB551-4A34-4c4d-83EA-7D3D7E2E49DF" #End Region #Region "Events" Public Event Progress(ByVal Value As Long, ByVal Maximum As Long) Public Event Status(ByVal StatusMessage As String) #End Region
Now, in VB6, after I referenced it, I used this: Private WithEvents Ency As DGRE.Rythmia
Private Sub Form_Load() Set Ency = New DGRE.Rythmia End Sub
And I get this when I try to select an Event: "Function or Interface is marked as restricted, or the function uses an Automation Type not supported in Visual Basic"
Long in VB.NET is a 64 bit signed integer. VB6 has no corresponding type.
Long in VB6 is the same type as Integer in VB.NET.
So change your Progress event to use Integer instead of Long.
David
Someone got a big hand I can smack myself with. Jeez LMAO
Thanks again David
Tibby
"David Browne" <davidbaxterbrowne no potted me**@hotmail.com> wrote in
message news:Of*************@TK2MSFTNGP11.phx.gbl... "Tibby" <ti*************@hotmail.com> wrote in message news:OK**************@tk2msftngp13.phx.gbl... Boy, bet I'm being a pest now... Well, got the COM interop working, or
so I though. Here's the .NET code in the DLL...
<ComClass(Rythmia.ClassID, Rythmia.InterfaceId, Rythmia.EventsId)> _ Public Class Rythmia #Region "COM Class IDs" Public Const ClassID As String = "5F0D4112-B23D-4703-94F5-B5B96E50F3BB" Public Const InterfaceId As String = "A9DFEE4E-3DBB-4505-BBC6-9BCEE5A220A5" Public Const EventsId As String = "E6CAB551-4A34-4c4d-83EA-7D3D7E2E49DF" #End Region #Region "Events" Public Event Progress(ByVal Value As Long, ByVal Maximum As Long) Public Event Status(ByVal StatusMessage As String) #End Region
Now, in VB6, after I referenced it, I used this: Private WithEvents Ency As DGRE.Rythmia
Private Sub Form_Load() Set Ency = New DGRE.Rythmia End Sub
And I get this when I try to select an Event: "Function or Interface is marked as restricted, or the function uses an Automation Type not supported in Visual Basic"
Long in VB.NET is a 64 bit signed integer. VB6 has no corresponding type. Long in VB6 is the same type as Integer in VB.NET.
So change your Progress event to use Integer instead of Long.
David
Hi Libby,
LOL.
Sometimes it's the big things. Sometimes it's the little things.
And sometimes it's the big things that used to be little things!! ;-)
Regards,
Fergus This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: roy |
last post by:
I try to call com written in VB 6.0. When I use VS.net
Studio to do the debuging, some time it works fine, some
time I got the following message:
Server Error in '/GISOnlineReservation'...
|
by: roy |
last post by:
I try to call com written in VB 6.0., some time it works
fine, some time I got the following message:
Server Error in '/GISOnlineReservation' Application....
|
by: keefah |
last post by:
Hi,
I'm writing a C# web app that uses Outlook to send email. I use a reference
to the Microsoft Outlook 11.0 Object Library, but it's giving me problems. I
tracked down some stuff on the Net...
|
by: lacour |
last post by:
I can't seem to figure out the difference between adding a COM dll
reference in VS2003 and by using TLBIMP.
I have a COM dll that references another COM dll, and I want the syntax
of my...
|
by: Nadav |
last post by:
Hi,
Introduction
***************
I have a system build of a collection of 'Native COM objects' and '.NET COM interop' objects, all of the COM objects are managed through a 'Native COM' layer,...
|
by: Rob Edwards |
last post by:
When trying to add the Microsoft CDO for Exchange Management Library (aka CDOEXM.dll) I receive the following message:
"A reference to 'Microsoft CDO for Exchange Management Library' could not be...
|
by: R Reyes |
last post by:
Can someone please explain to me why I can't get the MS Word Interop assembly
to work in my VS2005 project? I'm trying to manipulate MS Word from my Web
Form application and I can't get passed...
|
by: JC |
last post by:
Anybody knows what problem has this code? I think, in the Garbage
Collector? You know the Solution?
The program in the test's case, whit 350 contacts, run OK before number
86. The error is a...
|
by: allbelonging |
last post by:
C#.Net Outlook 2003 automation (programmatically) with Office.Interop.Outlook
Problem:
I have my outlook 2003 configured with multiple mailbox on my local machine.
I want to specify the mailbox...
|
by: Tina |
last post by:
I've gotten this before where it says there is a problem with Interop.MSDASC
but I can't remember what causes this. This is a 1.1 app I'm trying to
debug in vs2005. It was running yesterday just...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
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...
|
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,...
|
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...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |