all groups > dotnet interop > october 2006 >
You're in the

dotnet interop

group:

InsertMenuItem with MIIM_BITMAP fails with GetLastError() 8


Re: InsertMenuItem with MIIM_BITMAP fails with GetLastError() 8 Mattias Sjögren
10/29/2006 9:28:08 PM
dotnet interop:
[quoted text, click to view]

That's a bad idea to start with. See here why

http://blogs.msdn.com/junfeng/archive/2005/11/18/494572.aspx


Mattias

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
InsertMenuItem with MIIM_BITMAP fails with GetLastError() 8 OPM
10/29/2006 10:27:28 PM
Hi guys,

I'm working on a context shell extension in C#. I'm trying to add bitmaps to
the menus.

This is based on Dino Espinosa's code at
http://www.theserverside.net/news/thread.tss?thread_id=26795

The code works fine, but I'm trying to show a bitmap by specifying fMask |=
(uint)MIIM.BITMAP and setting hbmpItemp to
[bitmapObject].GetHbitmap().ToInt32().

I get Win32 error 8 "Not enough storage is available to process this
command."

Any ideas? Much obliged.

Re: InsertMenuItem with MIIM_BITMAP fails with GetLastError() 8 OPM
10/30/2006 12:00:00 AM
Hi Mattias,

Thanks, and a very valid point. I guess I'll need to finally learn COM
programming in C.

I'm fairly proficient in C, can you recommend a good shell programming book
that also introduces the reader to COM?

Cheers

[quoted text, click to view]

Re: InsertMenuItem with MIIM_BITMAP fails with GetLastError() 8 Mattias Sjögren
11/5/2006 3:55:33 PM

[quoted text, click to view]

No sorry, the only shell book I've ever read was aimed at VB6 devs.

You can probably get a better answer if you as in the
microsoft.public.platformsdk.shell group.


Mattias

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
AddThis Social Bookmark Button