Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / June 2007

Tip: Looking for answers? Try searching our database.

Problem with tlbimp

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tim Haughton - 20 Jun 2007 08:52 GMT
I'm trying to use the IThumbnailCache COM interface to query Vista's system
thumbnail cache. Unfortunately there's no type library for it. Here's what
I've done so far:

- Created thumbcache.tlb from thumbcache.idl using midl

- Created thumbcachelib.dll from thumbcache.tlb using tlbimp

- Tried to use it.

There were a multitude of errors when I used tlbimp, but everything seemed
to work until...

A method on the SharedBitmap had the wrong signature. We had:

void GetSharedBitmap(IntPtr phbm);

Instead of

void GetSharedBitmap(out IntPtr phbm);

So we checked the idl, which was correct, then we looked at tlbimp's
output -

TlbImp : warning TI0000 : At least one of the arguments for
'ISharedBitmap.GetSharedBitmap' cannot be marshaled by the runtime
marshaler.  Such arguments will therefore be passed as a pointer and may
require unsafe code to manipulate.

So, I'm thinking this is the problem I'm seeing. Obviously, I still need to
get a hold of the IntPtr so I can construct the bitmap on the .Net end. Any
suggestions?

Cheers,

Tim
Nicholas Paldino [.NET/C# MVP] - 20 Jun 2007 15:07 GMT
Tim,

   Why not declare the interface in code?  You don't have to use TLBIMP to
create an interface.  If you know the definition and the IID of the
interface, then it is quite easy.

   Can you post or reference the IDL file?  Then we can probably give you a
definition you can use.

Signature

         - Nicholas Paldino [.NET/C# MVP]
         - mvp@spam.guard.caspershouse.com

> I'm trying to use the IThumbnailCache COM interface to query Vista's
> system thumbnail cache. Unfortunately there's no type library for it.
[quoted text clipped - 32 lines]
>
> Tim

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.