Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 189
  • Last Modified:

500 points - An invisible thread in VB.Net!!

Ok, i've been working on this all day so someone please help me figure this out!

I have a program that needs to pull a load of info from Outlook, because everytime i access something like contacts or addresses the outlook security warning pops up. So, i look at a few microsoft articles and write myself a 'shared Addin' project.

This basically kicks of an event everytime Outlook starts, passing through the Application object, which in theory should be security warnings free...

The only problem is, that when i pass the application to my main program (another Class project) then it seems to go 'under' the Vb.Net debugger. i.e. none of the breakpoints catch the thread, but if i put a msgbox in the way of the thread, that will show!

I also tried to invoke the UI thread by calling the main application form which is shared in another project, and although it exists in the 'debugged' thread... it is empty in the thread that it's been passed to!

How can i get that application object to the currently running instance of my program?

0
Cloud9_User
Asked:
Cloud9_User
  • 3
  • 2
1 Solution
 
Cloud9_UserAuthor Commented:
Also.... shared variables (that in my understanding) were meant to be available in ANY instance of a Class are returning blank in the instance from Outlook! even if i've set them earlier in another instance.
0
 
Corey ScheichDeveloperCommented:
I don't know if it would be acceptable in your situation but for some in house apps I got around the Outlook Dialogs by using Context Magic's Click Yes Program.  It is a utility that sits in the system try and can be turned on and off programatically.  When turned on it watches for these 2 outlook dialogs and clicks yes no waiting as soon as the dialogs are shown they go away.  You do see 2 quick flashes of the dialogs but it isn't much of an interuption.  www.contextmagic.com they have examples on how to implement it and everything.  I think it works quite well.

Corey2

(I know this doesn't really answer your question just a means to an end.)

As far as your actual question the debugger attaches to the main thread but I think you may have to manually attach it to subsequent threads, though I'm not sure about that.
0
 
Cloud9_UserAuthor Commented:
Thanks for the reply...

I think thats going to be the agreed method when i distribute the proggy....

It doesn't answer the question but your the only one that took the time out to try... enjoy the points :)

0
 
Corey ScheichDeveloperCommented:
Thanks for the points, I just wish I had a better answer for you.
0
 
Cloud9_UserAuthor Commented:
Nah its ok... after two days i gave up on it

I'll have to go back to that one once everything else is finished :)

Thanks anyhow
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now