Profiler 
Author Message
 Profiler

Hi. Where could I ask about profiler using?

-d



Thu, 24 Mar 2005 02:52:52 GMT  
 Profiler
Hello.

I am writing an Outlook plugin and have to #import interfaces from mso.dll
from Office10.
In my class, I am using __hook to sink events from a CommandBarButton. I
have the following statements:

#import "D:\Program Files\Common Files\Microsoft Shared\Office10\mso.dll"
embedded_idl named_guidsusing namespace Office;
....
[
coclass,
threading("single"),
support_error_info("IGsAddin"),
vi_progid("Groupserver.Addin"),
progid("Groupserver.Addin.1"),
uuid("FFDB1C14-8581-4CB8-A7F3-8548A042A4E9"),
event_receiver(com)
]
class ATL_NO_VTABLE CGsAddin :
.....

///click handler method:
void __stdcall OnClickMenu( Office::_CommandBarButton *Ctrl, VARIANT_BOOL
*CancelDefault);
......
__hook(Office::_CommandBarButtonEvents::Click , (IDispatch*)m_spMenu,
OnClickMenu);
......
________________
Code compiles ok but at link time, I get MIDL error 2269: method "Click"
from the ICommandBarButtonEvents interface must return a HRESULT.
Indeed, in mso.tlh I can see the Click method written as returning "void".
If I don't provide the embedded_idl attr, the wrapper code for all mso
interfaces provides a HRESULT as return code for Click (but no attributes
for any of the interfaces). With the embedded_idl attribute,. I have all
attributes in mso.tlh but the wrapper code writes the Click method with
void.

If I don't provide embedded_idl, compiler complains about interfaces
extending IDispatch...So I have to provide it...

I tried to exclude the interfaces I needed from mso.tlh and inserted them
separate from the #import in stdafx.h, changing the return type from void to
HRESULT. Everything compiled ok, I was able to load the plufin in outlook,
but cannot receive ebents from the button.

I want to be able to use the new attributed features in VC7 for writing the
plugin (hook, event_receiver, etc) and be able to receive events from a
CommandBarButton from mso.dll

Could anyone please help ?

Thank you very mush,
  Cristian M.



Thu, 24 Mar 2005 05:48:26 GMT  
 Profiler
Hello.

I am writing an Outlook plugin and have to #import interfaces from mso.dll
from Office10.
In my class, I am using __hook to sink events from a CommandBarButton. I
have the following statements:

#import "D:\Program Files\Common Files\Microsoft Shared\Office10\mso.dll"
embedded_idl named_guidsusing namespace Office;
....
[
coclass,
threading("single"),
support_error_info("IGsAddin"),
vi_progid("Groupserver.Addin"),
progid("Groupserver.Addin.1"),
uuid("FFDB1C14-8581-4CB8-A7F3-8548A042A4E9"),
event_receiver(com)
]
class ATL_NO_VTABLE CGsAddin :
.....

///click handler method:
void __stdcall OnClickMenu( Office::_CommandBarButton *Ctrl, VARIANT_BOOL
*CancelDefault);
......
__hook(Office::_CommandBarButtonEvents::Click , (IDispatch*)m_spMenu,
OnClickMenu);
......
________________
Code compiles ok but at link time, I get MIDL error 2269: method "Click"
from the ICommandBarButtonEvents interface must return a HRESULT.
Indeed, in mso.tlh I can see the Click method written as returning "void".
If I don't provide the embedded_idl attr, the wrapper code for all mso
interfaces provides a HRESULT as return code for Click (but no attributes
for any of the interfaces). With the embedded_idl attribute,. I have all
attributes in mso.tlh but the wrapper code writes the Click method with
void.

If I don't provide embedded_idl, compiler complains about interfaces
extending IDispatch...So I have to provide it...

I tried to exclude the interfaces I needed from mso.tlh and inserted them
separate from the #import in stdafx.h, changing the return type from void to
HRESULT. Everything compiled ok, I was able to load the plufin in outlook,
but cannot receive ebents from the button.

I want to be able to use the new attributed features in VC7 for writing the
plugin (hook, event_receiver, etc) and be able to receive events from a
CommandBarButton from mso.dll

Could anyone please help ?

Thank you very much,
  Cristian M.



Mon, 28 Mar 2005 08:24:15 GMT  
 Profiler
Hi

There are some interfaces in the typelib that are marked as dual but all its
methods do not return HRESULT. These interfaces have to be included inside
the library block in an IDL file. Following should allow you to get past the
link errors.

namespace Office
{
// library_block forces the interface to be included inside the library
block.
[library_block] __interface ICommandBarsEvents;
[library_block] __interface ICommandBarComboBoxEvents;
[library_block] __interface ICommandBarButtonEvents;
[library_block] __interface DocumentProperty;
[library_block] __interface Office_DocumentProperties;

Quote:
}

#import "C:\Program Files\Common Files\Microsoft Shared\Office10\mso.dll"
named_guids \
 embedded_idl \
 rename("RGB", "Office_RGB") \
 rename("DocumentProperties", "Office_DocumentProperties")

--
Sridhar Madhugiri
Visual C++ Libraries Team

This posting is provided "AS IS" with no warranties, and confers no rights.


Quote:
> Hello.

> I am writing an Outlook plugin and have to #import interfaces from mso.dll
> from Office10.
> In my class, I am using __hook to sink events from a CommandBarButton. I
> have the following statements:

> #import "D:\Program Files\Common Files\Microsoft Shared\Office10\mso.dll"
> embedded_idl named_guidsusing namespace Office;
> ....
> [
> coclass,
> threading("single"),
> support_error_info("IGsAddin"),
> vi_progid("Groupserver.Addin"),
> progid("Groupserver.Addin.1"),
> uuid("FFDB1C14-8581-4CB8-A7F3-8548A042A4E9"),
> event_receiver(com)
> ]
> class ATL_NO_VTABLE CGsAddin :
> .....

> ///click handler method:
> void __stdcall OnClickMenu( Office::_CommandBarButton *Ctrl, VARIANT_BOOL
> *CancelDefault);
> ......
> __hook(Office::_CommandBarButtonEvents::Click , (IDispatch*)m_spMenu,
> OnClickMenu);
> ......
> ________________
> Code compiles ok but at link time, I get MIDL error 2269: method "Click"
> from the ICommandBarButtonEvents interface must return a HRESULT.
> Indeed, in mso.tlh I can see the Click method written as returning "void".
> If I don't provide the embedded_idl attr, the wrapper code for all mso
> interfaces provides a HRESULT as return code for Click (but no attributes
> for any of the interfaces). With the embedded_idl attribute,. I have all
> attributes in mso.tlh but the wrapper code writes the Click method with
> void.

> If I don't provide embedded_idl, compiler complains about interfaces
> extending IDispatch...So I have to provide it...

> I tried to exclude the interfaces I needed from mso.tlh and inserted them
> separate from the #import in stdafx.h, changing the return type from void
to
> HRESULT. Everything compiled ok, I was able to load the plufin in outlook,
> but cannot receive ebents from the button.

> I want to be able to use the new attributed features in VC7 for writing
the
> plugin (hook, event_receiver, etc) and be able to receive events from a
> CommandBarButton from mso.dll

> Could anyone please help ?

> Thank you very much,
>   Cristian M.



Wed, 06 Apr 2005 07:04:59 GMT  
 Profiler
Looking at the MSO.DLL type library, the Click method does indeed return
void. #import is generating the correct code according to the tlb. The bug
is with the MSO.DLL type library. To work around this problem, you should
just manually modify the tlh file and #include it explicitly (in place of
#import) once it's generated.

--
Anson Tsao, Jeff Peil

Visual C++ Team
This posting is provided "AS IS" with no warranties, and confers no rights.


Quote:
> Hello.

> I am writing an Outlook plugin and have to #import interfaces from mso.dll
> from Office10.
> In my class, I am using __hook to sink events from a CommandBarButton. I
> have the following statements:

> #import "D:\Program Files\Common Files\Microsoft Shared\Office10\mso.dll"
> embedded_idl named_guidsusing namespace Office;
> ....
> [
> coclass,
> threading("single"),
> support_error_info("IGsAddin"),
> vi_progid("Groupserver.Addin"),
> progid("Groupserver.Addin.1"),
> uuid("FFDB1C14-8581-4CB8-A7F3-8548A042A4E9"),
> event_receiver(com)
> ]
> class ATL_NO_VTABLE CGsAddin :
> .....

> ///click handler method:
> void __stdcall OnClickMenu( Office::_CommandBarButton *Ctrl, VARIANT_BOOL
> *CancelDefault);
> ......
> __hook(Office::_CommandBarButtonEvents::Click , (IDispatch*)m_spMenu,
> OnClickMenu);
> ......
> ________________
> Code compiles ok but at link time, I get MIDL error 2269: method "Click"
> from the ICommandBarButtonEvents interface must return a HRESULT.
> Indeed, in mso.tlh I can see the Click method written as returning "void".
> If I don't provide the embedded_idl attr, the wrapper code for all mso
> interfaces provides a HRESULT as return code for Click (but no attributes
> for any of the interfaces). With the embedded_idl attribute,. I have all
> attributes in mso.tlh but the wrapper code writes the Click method with
> void.

> If I don't provide embedded_idl, compiler complains about interfaces
> extending IDispatch...So I have to provide it...

> I tried to exclude the interfaces I needed from mso.tlh and inserted them
> separate from the #import in stdafx.h, changing the return type from void
to
> HRESULT. Everything compiled ok, I was able to load the plufin in outlook,
> but cannot receive ebents from the button.

> I want to be able to use the new attributed features in VC7 for writing
the
> plugin (hook, event_receiver, etc) and be able to receive events from a
> CommandBarButton from mso.dll

> Could anyone please help ?

> Thank you very much,
>   Cristian M.



Mon, 11 Apr 2005 03:00:52 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Profiler & Leak detector

2. Profiler

3. Where's my profiler??

4. Profiler?

5. Compuware Profiler

6. Is there a profiler comes with VC7??

7. q: profiler for webform app ?

8. VS.NET Profiler

9. C profiler at micrsosecond level timing

10. C source analyser/profiler

11. Binary Profiler

12. Student(Beginner) - How do I use Borlands Profiler?

 

 
Powered by phpBB® Forum Software