473,396 Members | 2,158 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,396 software developers and data experts.

convert idl to c# or tlb

Hi,
i need to use some classes defined inside urlmon.dll, i have its idl
and c++ (.h file) definitions and i need to convert one of them to C#
or to a type library (tlb). i also have urlmon.lib but i don't know if
it could be useful. I tried to use midl.exe to convert idl to tlb but
it dosen't creates any TLB file! just some c++ files like urlmon.h,
urlmon_i.c, dlldata.c and urlmon_p.c. And MIDL says that everything is
ok! What can i do?
thanks in advance

Nov 8 '06 #1
8 9749
This is just the default for the compiler. If you want a TLB file you'll
need to use the appropriate command line option. Don't remember but from the
doc I believe the /newtlb switch could be enought...

You'll find the MIDL documentation at :
http://msdn.microsoft.com/library/de...compiler_2.asp

If it works it could be likely quicker than converting the IDL file to C#
(though the syntax have some similarity and is likely inspired from IDL).

--
Patrice

"VeNoM00" <ve*************@gmail.coma écrit dans le message de news:
11**********************@k70g2000cwa.googlegroups. com...
Hi,
i need to use some classes defined inside urlmon.dll, i have its idl
and c++ (.h file) definitions and i need to convert one of them to C#
or to a type library (tlb). i also have urlmon.lib but i don't know if
it could be useful. I tried to use midl.exe to convert idl to tlb but
it dosen't creates any TLB file! just some c++ files like urlmon.h,
urlmon_i.c, dlldata.c and urlmon_p.c. And MIDL says that everything is
ok! What can i do?
thanks in advance

Nov 8 '06 #2
no, /newtlb is the default:

/newtlb Generate new format type libraries (default)

i tried to specify it explitly but nothing...

Patrice wrote:
This is just the default for the compiler. If you want a TLB file you'll
need to use the appropriate command line option. Don't remember but from the
doc I believe the /newtlb switch could be enought...

You'll find the MIDL documentation at :
http://msdn.microsoft.com/library/de...compiler_2.asp

If it works it could be likely quicker than converting the IDL file to C#
(though the syntax have some similarity and is likely inspired from IDL).

--
Patrice

"VeNoM00" <ve*************@gmail.coma écrit dans le message de news:
11**********************@k70g2000cwa.googlegroups. com...
Hi,
i need to use some classes defined inside urlmon.dll, i have its idl
and c++ (.h file) definitions and i need to convert one of them to C#
or to a type library (tlb). i also have urlmon.lib but i don't know if
it could be useful. I tried to use midl.exe to convert idl to tlb but
it dosen't creates any TLB file! just some c++ files like urlmon.h,
urlmon_i.c, dlldata.c and urlmon_p.c. And MIDL says that everything is
ok! What can i do?
thanks in advance
Nov 8 '06 #3
Have you checked also that the IDL files contains a library statement ? I
would try with a simple dummy file to make sure...

Sorry for the poor help but it's been a while since I last used MIDL...

--
Patrice

"VeNoM00" <ve*************@gmail.coma écrit dans le message de news:
11*********************@k70g2000cwa.googlegroups.c om...
no, /newtlb is the default:

/newtlb Generate new format type libraries (default)

i tried to specify it explitly but nothing...

Patrice wrote:
This is just the default for the compiler. If you want a TLB file you'll
need to use the appropriate command line option. Don't remember but from
the
doc I believe the /newtlb switch could be enought...

You'll find the MIDL documentation at :
http://msdn.microsoft.com/library/de...compiler_2.asp

If it works it could be likely quicker than converting the IDL file to C#
(though the syntax have some similarity and is likely inspired from IDL).

--
Patrice

"VeNoM00" <ve*************@gmail.coma écrit dans le message de news:
11**********************@k70g2000cwa.googlegroups. com...
Hi,
i need to use some classes defined inside urlmon.dll, i have its idl
and c++ (.h file) definitions and i need to convert one of them to C#
or to a type library (tlb). i also have urlmon.lib but i don't know if
it could be useful. I tried to use midl.exe to convert idl to tlb but
it dosen't creates any TLB file! just some c++ files like urlmon.h,
urlmon_i.c, dlldata.c and urlmon_p.c. And MIDL says that everything is
ok! What can i do?
thanks in advance

Nov 8 '06 #4
what's a library statement? how can i add it? if you are interested the
file is urlmon.idl
here's a link to a copy of that file:
http://www.rafb.net/paste/results/7Bb2Gz51.html

Patrice wrote:
Have you checked also that the IDL files contains a library statement ? I
would try with a simple dummy file to make sure...

Sorry for the poor help but it's been a while since I last used MIDL...

--
Patrice

"VeNoM00" <ve*************@gmail.coma écrit dans le message de news:
11*********************@k70g2000cwa.googlegroups.c om...
no, /newtlb is the default:

/newtlb Generate new format type libraries (default)

i tried to specify it explitly but nothing...

Patrice wrote:
This is just the default for the compiler. If you want a TLB file you'll
need to use the appropriate command line option. Don't remember but from
the
doc I believe the /newtlb switch could be enought...

You'll find the MIDL documentation at :
http://msdn.microsoft.com/library/de...compiler_2.asp

If it works it could be likely quicker than converting the IDL file to C#
(though the syntax have some similarity and is likely inspired from IDL).

--
Patrice

"VeNoM00" <ve*************@gmail.coma écrit dans le message de news:
11**********************@k70g2000cwa.googlegroups. com...
Hi,
i need to use some classes defined inside urlmon.dll, i have its idl
and c++ (.h file) definitions and i need to convert one of them to C#
or to a type library (tlb). i also have urlmon.lib but i don't know if
it could be useful. I tried to use midl.exe to convert idl to tlb but
it dosen't creates any TLB file! just some c++ files like urlmon.h,
urlmon_i.c, dlldata.c and urlmon_p.c. And MIDL says that everything is
ok! What can i do?
thanks in advance
>
Nov 8 '06 #5
This is the statement that defines a type library and it seems to be missing
from this IDL file.

Are you use you need a "class" from this file. If a STDAPI call, it could be
simpler after all ;-) to use DllImport to declare the function you need.

You may want also to explain what exactly you are trying to do in case
someone would have an alternate simpler way of doing this than using URLMon.

Good luck.

--
Patrice

"VeNoM00" <ve*************@gmail.coma écrit dans le message de news:
11*********************@m73g2000cwd.googlegroups.c om...
what's a library statement? how can i add it? if you are interested the
file is urlmon.idl
here's a link to a copy of that file:
http://www.rafb.net/paste/results/7Bb2Gz51.html

Patrice wrote:
Have you checked also that the IDL files contains a library statement ? I
would try with a simple dummy file to make sure...

Sorry for the poor help but it's been a while since I last used MIDL...

--
Patrice

"VeNoM00" <ve*************@gmail.coma écrit dans le message de news:
11*********************@k70g2000cwa.googlegroups.c om...
no, /newtlb is the default:

/newtlb Generate new format type libraries (default)

i tried to specify it explitly but nothing...

Patrice wrote:
This is just the default for the compiler. If you want a TLB file you'll
need to use the appropriate command line option. Don't remember but from
the
doc I believe the /newtlb switch could be enought...

You'll find the MIDL documentation at :
http://msdn.microsoft.com/library/de...compiler_2.asp

If it works it could be likely quicker than converting the IDL file to
C#
(though the syntax have some similarity and is likely inspired from
IDL).

--
Patrice

"VeNoM00" <ve*************@gmail.coma écrit dans le message de news:
11**********************@k70g2000cwa.googlegroups. com...
Hi,
i need to use some classes defined inside urlmon.dll, i have its idl
and c++ (.h file) definitions and i need to convert one of them to C#
or to a type library (tlb). i also have urlmon.lib but i don't know if
it could be useful. I tried to use midl.exe to convert idl to tlb but
it dosen't creates any TLB file! just some c++ files like urlmon.h,
urlmon_i.c, dlldata.c and urlmon_p.c. And MIDL says that everything is
ok! What can i do?
thanks in advance
>

Nov 8 '06 #6
i need to use the interface IInternteSession and many others... :/ i'm
trying to create a mime filter for ie in c# (actually in vb.net but the
language doesn't matter).

So... you haven't an idea of why midl doesn't work properly?

Patrice ha scritto:
This is the statement that defines a type library and it seems to be missing
from this IDL file.

Are you use you need a "class" from this file. If a STDAPI call, it couldbe
simpler after all ;-) to use DllImport to declare the function you need.

You may want also to explain what exactly you are trying to do in case
someone would have an alternate simpler way of doing this than using URLMon.

Good luck.

--
Patrice

"VeNoM00" <ve*************@gmail.coma écrit dans le message de news:
11*********************@m73g2000cwd.googlegroups.c om...
what's a library statement? how can i add it? if you are interested the
file is urlmon.idl
here's a link to a copy of that file:
http://www.rafb.net/paste/results/7Bb2Gz51.html

Patrice wrote:
Have you checked also that the IDL files contains a library statement ?I
would try with a simple dummy file to make sure...

Sorry for the poor help but it's been a while since I last used MIDL...

--
Patrice

"VeNoM00" <ve*************@gmail.coma écrit dans le message de news:
11*********************@k70g2000cwa.googlegroups.c om...
no, /newtlb is the default:

/newtlb Generate new format type libraries (default)

i tried to specify it explitly but nothing...

Patrice wrote:
This is just the default for the compiler. If you want a TLB file you'll
need to use the appropriate command line option. Don't remember but from
the
doc I believe the /newtlb switch could be enought...
>
You'll find the MIDL documentation at :
http://msdn.microsoft.com/library/de...compiler_2.asp
>
If it works it could be likely quicker than converting the IDL file to
C#
(though the syntax have some similarity and is likely inspired from
IDL).
>
--
Patrice
>
"VeNoM00" <ve*************@gmail.coma écrit dans le message de news:
11**********************@k70g2000cwa.googlegroups. com...
Hi,
i need to use some classes defined inside urlmon.dll, i have its idl
and c++ (.h file) definitions and i need to convert one of them to C#
or to a type library (tlb). i also have urlmon.lib but i don't knowif
it could be useful. I tried to use midl.exe to convert idl to tlb but
it dosen't creates any TLB file! just some c++ files like urlmon.h,
urlmon_i.c, dlldata.c and urlmon_p.c. And MIDL says that everythingis
ok! What can i do?
thanks in advance
Nov 8 '06 #7
>i need to use the interface IInternteSession and many others... :/ i'm
>trying to create a mime filter for ie in c# (actually in vb.net but the
language doesn't matter).
I wouldn't recommend doing that in managed code. The reason is the
same as for shell extensions. The filter may be loaded into processes
that don't expect managed code to run, or that may already have loaded
an incompatible version of the CLR.

http://blogs.msdn.com/junfeng/archiv...18/494572.aspx
Mattias

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Nov 8 '06 #8
That's not a problem: i'm creating a browser. This mime filter will
affect just my process

Mattias Sjögren ha scritto:
i need to use the interface IInternteSession and many others... :/ i'm
trying to create a mime filter for ie in c# (actually in vb.net but the
language doesn't matter).

I wouldn't recommend doing that in managed code. The reason is the
same as for shell extensions. The filter may be loaded into processes
that don't expect managed code to run, or that may already have loaded
an incompatible version of the CLR.

http://blogs.msdn.com/junfeng/archiv...18/494572.aspx
Mattias

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Nov 8 '06 #9

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

Similar topics

19
by: Lauren Quantrell | last post by:
I have a stored procedure using Convert where the exact same Convert string works in the SELECT portion of the procedure but fails in the WHERE portion. The entire SP is listed below....
1
by: Logan X via .NET 247 | last post by:
It's official....Convert blows. I ran a number of tests converting a double to an integer usingboth Convert & CType. I *ASSUMED* that CType would piggy-back ontop of Convert, and that performance...
4
by: Eric Lilja | last post by:
Hello, I've made a templated class Option (a child of the abstract base class OptionBase) that stores an option name (in the form someoption=) and the value belonging to that option. The value is...
7
by: whatluo | last post by:
Hi, all I'm now working on a program which will convert dec number to hex and oct and bin respectively, I've checked the clc but with no luck, so can anybody give me a hit how to make this done...
3
by: Convert TextBox.Text to Int32 Problem | last post by:
Need a little help here. I saw some related posts, so here goes... I have some textboxes which are designed for the user to enter a integer value. In "old school C" we just used the atoi function...
7
by: patang | last post by:
I want to convert amount to words. Is there any funciton available? Example: $230.30 Two Hundred Thirty Dollars and 30/100
4
by: Edwin Knoppert | last post by:
In my code i use the text from a textbox and convert it to a double value. I was using Convert.ToDouble() but i'm used to convert comma to dot. This way i can assure the text is correct. However...
1
by: johnlim20088 | last post by:
Hi, Currently I have 6 web projects located in Visual Source Safe 6.0, as usual, everytime I will open solution file located in my local computer, connected to source safe, then check out/check in...
6
by: Ken Fine | last post by:
This is a basic question. What is the difference between casting and using the Convert.ToXXX methods, from the standpoint of the compiler, in terms of performance, and in other ways? e.g. ...
0
Debadatta Mishra
by: Debadatta Mishra | last post by:
Introduction In this article I will provide you an approach to manipulate an image file. This article gives you an insight into some tricks in java so that you can conceal sensitive information...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.