Solved

Getting tutorial code to work

Posted on 2004-04-22
9
197 Views
Last Modified: 2010-04-15
If you can get either one of the following tutorials to work, I would like to speak with you:

1)  http://www.codeproject.com/csharp/CsManagedEventSinksHooks.asp

The thing I am most interested in is if the RegEvent.vbs file worked for you.


2)   http://msdn.microsoft.com/library/en-us/dnsmtps/html/writingmngsinks.asp?frame=true

If you try this one, I need to know all of the deviations from the tutorial you took to get it to work.


I am just trying to figure out if it is only ME having trouble with these tutorials, or if other people have trouble as well.

Thanks,


Tom



PS:  My current problem is summarized here:

http://www.knowltonfamily.com/es_troubleshoot.htm

0
Comment
Question by:knowlton
  • 7
  • 2
9 Comments
 
LVL 5

Author Comment

by:knowlton
ID: 10890789
The points for this question are for the first person to get one of these online tutorials to work properly.  :)
0
 
LVL 23

Accepted Solution

by:
rama_krishna580 earned 500 total points
ID: 10895400
0
 
LVL 5

Author Comment

by:knowlton
ID: 10900786
rama:

Are you going to try the tutorial as I requested?
0
 
LVL 5

Author Comment

by:knowlton
ID: 10904674
I stumbled upon the answer I needed.

Turns out RegEvent.vbs is not needed.

Exchange Explorer  (found with Exchange 2003 SDK Tools) does the exact same thing.

Go here for details:

http://www.experts-exchange.com/Programming/Programming_Languages/C_Sharp/Q_20962654.html

All I had to do was right-click on the Component Services COM App....and click START.
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 5

Author Comment

by:knowlton
ID: 10904785
The tutorial at this link:

http://www.codeproject.com/csharp/CsManagedEventSinksHooks.asp


is very very good......................but it does have some flaws.

1)  You do NOT need to run RegEvent.vbs AT ALL......ignore this suggestion in the tutorial.  Instead, download and install the SDK Tools and run Exchange Explorer instead to register the Event and hook it into the EventSink code.

2)  I recommend using regsvcs /appname:YourAppName <full path to your DLL including extension>      from the command line, instead of using the Component Services GUI to register the COM DLL.  I have to do some further testing to see if the GUI works...but I know for sure the command line route using REGSVCS works well.

3)  After you have registered the COM DLL (your event sink) in Component Services......then go and register the Exchange Store Event using Exchange Explorer.   THEN go back to Component Services....right-click on your App Name and click on START.   This is what actually starts the EventSink (your C# DLL) talking to the Exchange Store.  Until you do this nothing will happen.   This was left out of the tutorial.  A small thing, but an important thing to mention.
0
 
LVL 23

Expert Comment

by:rama_krishna580
ID: 10905516
knowlton..thank you for accepting, i gave you that above link just to get an idea for you..thanx for ur sugeestion..
best of luck..

R.K
0
 
LVL 5

Author Comment

by:knowlton
ID: 10919534
Thanks, rama!
0
 
LVL 5

Author Comment

by:knowlton
ID: 11119941
UPDATE:

Well, guess what?

I finally had a major breakthrough on this @!#$^% problem that has been driving me crazy for the last few weeks!!!!!!!


It is a very small change.

Apparently the method   MoveFirst(   ) does not work so well with Exchange.

This was the cause of my COMException:   "Interface not registered" error message this entire time.


The solution is to use    Move(1,0)     instead of MoveFirst(  ).


That's it.   Simple.

This answer came courtesy of Tom Rizzo, an author who was kind enough to correspond with me and help me figure-out finally what the problem was.:

Looking for a good book on programming Exchange, Outlook, ADSI and
SharePoint?  Check out http://www.microsoft.com/MSPress/books/5517.asp

My I aslo reommend:

.NET and COM: The Complete Interoperability Guide  ISBN:067232170X
http://www.amazon.ca/exec/obidos/ASIN/067232170X/componentsnot-20/701-9386310-4703553
0
 
LVL 5

Author Comment

by:knowlton
ID: 11120269
More on the MoveFirst problem I described:

http://support.microsoft.com/default.aspx?scid=kb;en-us;273791


If you are getting into Event Sinks....I recommend the following tutorial:

http://www.codeproject.com/csharp/CsManagedEventSinksHooks.asp

Make sure and read the article questions and follow-ups at the bottom!

There are a few caveats.  E-mail me at my Profile e-mail address and we can talk about them.  :)
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now