473,386 Members | 1,819 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

80070002 error when interoperating with COM event sink

hi all,
I am just playing with the event sink sample on MSDN, but I found when I
create the instance in VB client, there is an error saying "method
'myButton' of object 'form1'failed, errorcode is 8007002. I don't know how
to fix it so far.

The sample is
http://msdn.microsoft.com/library/de...dbycomsink.asp
I use the c# sample

1) I specified a key file for the library
2) I used regasm and gacutil to export/register the typelib and intall it
into GAC
3) My VB code is almost the same as the sample except I added From_Load, in
which class_initialize is called(actually I am not sure whether this is
right way to do it because of my poor VB knowledge).

Any help are appreciated!

Qiu

Nov 15 '05 #1
1 10485
Thanks very much!
Your answer just reminds me that my dll is strong named, so I should use
full name of the assembly.
The error msg Vb reported just made me totally lost.

"Mattias Sjögren" <ma********************@mvps.org> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
I am just playing with the event sink sample on MSDN, but I found when Icreate the instance in VB client, there is an error saying "method
'myButton' of object 'form1'failed, errorcode is 8007002. I don't know howto fix it so far.


That's basicly a "File not found" error.

See if it helps to change

[ComSourceInterfaces("EventSource.ButtonEvents, EventSrc")]

to

[ComSourceInterfaces(typeof(ButtonEvents))]

3) My VB code is almost the same as the sample except I added From_Load, inwhich class_initialize is called(actually I am not sure whether this is
right way to do it because of my poor VB knowledge).


No you shouldn't call Class_Initialize manually. It's like a
constructor, and is called automatically whenever an instance of the
class is created.

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/
Please reply only to the newsgroup.

Nov 15 '05 #2

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

Similar topics

0
by: nk997 | last post by:
I need to catch all incoming emails on the exchange server and check them for bounced emails and then send them back on their way to the correct recipients. This article is useful as it provides the...
1
by: Notlwonk | last post by:
Not sure where to post this Q I am trying to write a Managed Exchange Server Event Sink (as a class library) in C# I have been following this tutorial step-by-step ...
0
by: Notlwonk | last post by:
I have written an event sink in C# that hooks into our Exchange Server 2000 store. The sink fires and the various LOG files are created, but for some reason I cannot seem to read-in the e-mail...
0
by: techie | last post by:
I have created an event sink in my ATL COM project. The event sink receives events from a C# component. There is no problem with receving events but when my COM object is released I get an access...
5
by: Sterling Anderson | last post by:
I have a customer who has a virus/spam application that registers a couple event sinks with SMTP to check for virus infected or spam email. Right now all the email that meets the "bad" criteria...
7
by: Don | last post by:
Getting errors after following the MSDN article on using VB.NET (and VS2005) for "Implementing a Managed OnSave Event Sink" for Exchange Server 2007. Not sure, but part of the problem may be that...
9
by: Eric Kaplan | last post by:
I have a function that will download XML from internet and load XML data into database. The function will take 5 - 20 minutes to finish. I heard I should use event sink (event listener) when...
1
by: mooni | last post by:
Hi all, I am trying to create a class that will act as event sink to a COM object. Just to tell you the COM object is SoftUSBEndpoint which is part of Device Simulation Framework. Anyways its...
5
by: =?Utf-8?B?Q29kZVJhem9y?= | last post by:
I have an event sink which does some work to the software we use, according to the data contained within an email. This is all working hunky dory. What i want to know is whether it is possible to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
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,...
0
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...

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.