PC Review


Reply
Thread Tools Rate Thread

missing IContextMenu

 
 
shafeeque
Guest
Posts: n/a
 
      10th Oct 2003
I am building a shell extn. project in .net ide which is
converted from vC++ 6.00.

During buid i am getting the following error
"error C2787: 'IContextMenu' : no GUID has been associated
with this object", The same project works fine in VC++6.0.

I have included the following files also
#include <shlguid.h>
#include <shobjidl.h>
#include <shlobj.h>

any help will be appreciated

 
Reply With Quote
 
 
 
 
Doug Harrison [MVP]
Guest
Posts: n/a
 
      11th Oct 2003
shafeeque wrote:

>I am building a shell extn. project in .net ide which is
>converted from vC++ 6.00.
>
>During buid i am getting the following error
>"error C2787: 'IContextMenu' : no GUID has been associated
>with this object", The same project works fine in VC++6.0.
>
>I have included the following files also
>#include <shlguid.h>
>#include <shobjidl.h>
>#include <shlobj.h>
>
>any help will be appreciated


This is interesting. There are two <comdef.h> header files in VC.NET, one in
Vc7/include and the other in Vc7/PlatformSDK/include. The former splits off
the smart pointer typedefs into comdefsp.h, and it doesn't include
IContextMenu. The latter does. You can try to #include the PlatformSDK
header directly, change your INCLUDE path order, or supply the missing
typedef yourself, e.g.

struct __declspec(uuid("000214e4-0000-0000-c000-000000000046"))
IContextMenu;

_COM_SMARTPTR_TYPEDEF(IContextMenu, __uuidof(IContextMenu));

--
Doug Harrison
Microsoft MVP - Visual C++
 
Reply With Quote
 
 
 
 
New Member
Join Date: Jun 2007
Posts: 1
 
      13th Jun 2007
The response is for people that find this thread by searching for the same error.

Just define at the top of the stdafx.h file above your includes:
#define _ATL_NO_UUIDOF

Thanks,
Brian R. Bondy
http://www.vwsolutions.com
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Missing Tasbar, Missing Start Button, Missing Desktop Icons =?Utf-8?B?TWlrZSBGaXNoZXI=?= Windows XP General 1 27th Dec 2005 10:03 PM
IContextMenu interface problem Rajko Microsoft VC .NET 2 1st May 2004 05:31 AM
IContextMenu InvokeCommand =?Utf-8?B?TGFycyBOaWVsc2Vu?= Microsoft C# .NET 4 14th Apr 2004 12:46 PM
Re: XP won't start missing/corrupt, missing config Michael Funaro Windows XP Help 0 22nd Nov 2003 07:04 PM
IContextMenu InvokeCommand timtos Microsoft C# .NET 0 11th Sep 2003 11:56 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:10 AM.