473,395 Members | 1,443 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Problem with tlbimp

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

Jun 20 '07 #1
1 3206
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.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Tim Haughton" <ti*********@gmail.comwrote in message
news:61********************@fe05.news.easynews.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.
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

Jun 20 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: xleyba | last post by:
Hi I'm new to .Net world. I need to develope an application for Diva BR ISDN card (CAPI programming) and I want to make it with C#. Diva API documentation comes with VBasic Net examples...
13
by: Tamir Khason | last post by:
I have an Application While running it on computer (just runtime) WITH VS works fine, BUT running it on other computer without VS it just do not want to run (exit with code 0 ) What can be...
0
by: Namratha Shah \(Nasha\) | last post by:
Type Library Importer : tlbImp This tool is used to convert the type library definitons found in COM components to .NET assembly. This tool works on the entire type library at the same time...
8
by: Rob Edwards | last post by:
When trying to add the Microsoft CDO for Exchange Management Library (aka CDOEXM.dll) I receive the following message: "A reference to 'Microsoft CDO for Exchange Management Library' could not be...
0
by: JS | last post by:
Hello I want translate a project from VB6 to VB.Net 1.0 In this project I have a graph with a MsChart COM control. When I want make reference (Projet/Ref /Com controle) to this chart I have an...
13
by: Lee Newson | last post by:
Hi, I have just written my first application using VB.NET. The app works fine when i am running it within .NET for debugging purposes, however when i try to run the app from the .exe file that...
1
by: mabra | last post by:
Hi All ! Sorry for my crossposting, I am not completely sure about which group is really of any help. I started using the WUA COM API from C#. I created an interop assembly and my code compiles...
2
by: AA | last post by:
Hi, I would like to use the type library import exe tlbimp.exe without actually having the .NET framework setup on the machine. Is there any way, like installing some minimal dlls, so that I can...
3
by: John Dann | last post by:
We've got a VB2005 program written some time back that we're trying to do some maintenance on still from within VB2005 but now running on a Vista Business PC (which I think may be relevant to the...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.