A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

How to compare two inspector objects?



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old January 5th 08, 08:10 AM posted to microsoft.public.outlook.program_addins
xwjbs
external usenet poster
 
Posts: 7
Default How to compare two inspector objects?

I want to compare two objects. The objects type is MS Outlook inspectors.
Here is the code.

struct Outlook::_Inspector* activeIn;
m_spApp-ActiveInspector(&activeIn);
if(NULL == activeIn)
continue;
CComPtrIUnknown activeUnk;
activeIn-QueryInterface(IID_IUnknown, (void**)&activeUnk);


struct Outlook::_Inspector* inspector;
CComPtrIUnknown spInspectUnk;
//IUnknown* spInspectUnk;

///*
for(long i=1;i=nNowNum;i++)
{
inspectors-Item(CComVariant(i),&inspector);

if(NULL == inspector || 0xcccccccc == (long)inspector)
continue;

inspector-IsWordMail(&bWordMail);
if(!bWordMail)
continue;

inspector-QueryInterface(IID_IUnknown, (void**)&spInspectUnk);

if(spInspectUnk.IsEqualObject(activeUnk))
{
//dosomething
//how to come in this block
}
}

I set a timer to check inspectors collection! But every time the value of
spInspectUnk changes. Would you like to tell me how to compare them?
Ads
  #2  
Old January 5th 08, 03:22 PM posted to microsoft.public.outlook.program_addins
Jeff[_7_]
external usenet poster
 
Posts: 11
Default How to compare two inspector objects?

Hi

As a quick thought, are your Inspector objects marshalled to different
threads / appartments? If so, you'll not be able to check the addresses of
the functions / objects.



"xwjbs" wrote in message
...
I want to compare two objects. The objects type is MS Outlook inspectors.
Here is the code.

struct Outlook::_Inspector* activeIn;
m_spApp-ActiveInspector(&activeIn);
if(NULL == activeIn)
continue;
CComPtrIUnknown activeUnk;
activeIn-QueryInterface(IID_IUnknown, (void**)&activeUnk);


struct Outlook::_Inspector* inspector;
CComPtrIUnknown spInspectUnk;
//IUnknown* spInspectUnk;

///*
for(long i=1;i=nNowNum;i++)
{
inspectors-Item(CComVariant(i),&inspector);

if(NULL == inspector || 0xcccccccc == (long)inspector)
continue;

inspector-IsWordMail(&bWordMail);
if(!bWordMail)
continue;

inspector-QueryInterface(IID_IUnknown, (void**)&spInspectUnk);

if(spInspectUnk.IsEqualObject(activeUnk))
{
//dosomething
//how to come in this block
}
}

I set a timer to check inspectors collection! But every time the value of
spInspectUnk changes. Would you like to tell me how to compare them?



  #3  
Old January 6th 08, 01:47 AM posted to microsoft.public.outlook.program_addins
[email protected]
external usenet poster
 
Posts: 5
Default How to compare two inspector objects?

OutlookSpy has some built in compare functions. It might help.



  #4  
Old January 6th 08, 02:45 AM posted to microsoft.public.outlook.program_addins
xwjbs
external usenet poster
 
Posts: 7
Default How to compare two inspector objects?

yes,the code here is put in a single thread,not in the main thread. And the
application object is a varaible which comes from the main thread. I use the
function sleep() so it works just like a timer. As you know ,there is no
newinspector event can be fired in ol2000! I want to use this to find the
newinspector,and then put it into a collection. If i can't comare two
objects, it will replicate inspector. A function that processes message
will not be seemed another thread? And it will work? I try it ! Thank you!


"Jeff" wrote:

Hi

As a quick thought, are your Inspector objects marshalled to different
threads / appartments? If so, you'll not be able to check the addresses of
the functions / objects.



"xwjbs" wrote in message
...
I want to compare two objects. The objects type is MS Outlook inspectors.
Here is the code.

struct Outlook::_Inspector* activeIn;
m_spApp-ActiveInspector(&activeIn);
if(NULL == activeIn)
continue;
CComPtrIUnknown activeUnk;
activeIn-QueryInterface(IID_IUnknown, (void**)&activeUnk);


struct Outlook::_Inspector* inspector;
CComPtrIUnknown spInspectUnk;
//IUnknown* spInspectUnk;

///*
for(long i=1;i=nNowNum;i++)
{
inspectors-Item(CComVariant(i),&inspector);

if(NULL == inspector || 0xcccccccc == (long)inspector)
continue;

inspector-IsWordMail(&bWordMail);
if(!bWordMail)
continue;

inspector-QueryInterface(IID_IUnknown, (void**)&spInspectUnk);

if(spInspectUnk.IsEqualObject(activeUnk))
{
//dosomething
//how to come in this block
}
}

I set a timer to check inspectors collection! But every time the value of
spInspectUnk changes. Would you like to tell me how to compare them?




  #5  
Old January 6th 08, 03:38 AM posted to microsoft.public.outlook.program_addins
xwjbs
external usenet poster
 
Posts: 7
Default How to compare two inspector objects?

I try to use settimer(),but it can't work either. I find that the __vfptr
member stay same all the time. Can i use it(i can't get it)? Would you like
to give me other advice? How to check it in a one thread? Thank you!

"Jeff" wrote:

Hi

As a quick thought, are your Inspector objects marshalled to different
threads / appartments? If so, you'll not be able to check the addresses of
the functions / objects.



"xwjbs" wrote in message
...
I want to compare two objects. The objects type is MS Outlook inspectors.
Here is the code.

struct Outlook::_Inspector* activeIn;
m_spApp-ActiveInspector(&activeIn);
if(NULL == activeIn)
continue;
CComPtrIUnknown activeUnk;
activeIn-QueryInterface(IID_IUnknown, (void**)&activeUnk);


struct Outlook::_Inspector* inspector;
CComPtrIUnknown spInspectUnk;
//IUnknown* spInspectUnk;

///*
for(long i=1;i=nNowNum;i++)
{
inspectors-Item(CComVariant(i),&inspector);

if(NULL == inspector || 0xcccccccc == (long)inspector)
continue;

inspector-IsWordMail(&bWordMail);
if(!bWordMail)
continue;

inspector-QueryInterface(IID_IUnknown, (void**)&spInspectUnk);

if(spInspectUnk.IsEqualObject(activeUnk))
{
//dosomething
//how to come in this block
}
}

I set a timer to check inspectors collection! But every time the value of
spInspectUnk changes. Would you like to tell me how to compare them?




 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to compare 2 contacts with VBA? Chris S[_2_] Outlook and VBA 10 December 19th 07 03:02 AM
How to uniquely identify explorer / inspector objects in Outlook 2007 gernot Add-ins for Outlook 5 September 11th 07 09:11 PM
How do I compare two contact files Jaron Outlook - Using Contacts 1 August 30th 06 01:50 PM
compare multiple contact lists Tish Outlook - Using Contacts 1 April 29th 06 03:07 PM
Help! Inspector.Close is fired before Inspector.Activate handler finishes Sergey Anchipolevsky Add-ins for Outlook 8 February 9th 06 09:51 AM


All times are GMT +1. The time now is 08:02 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2024 Outlook Banter.
The comments are property of their posters.