|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
convert idl to c# or tlbHi,
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 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/default.asp?url=/library/en-us/midl/midl/using_the_midl_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" <venom.zero.z***@gmail.com> a écrit dans le message de news: 1163004700.613920.156***@k70g2000cwa.googlegroups.com...Show quoteHide quote > 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 > no, /newtlb is the default:
/newtlb Generate new format type libraries (default) i tried to specify it explitly but nothing... Patrice wrote: Show quoteHide quote > 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/default.asp?url=/library/en-us/midl/midl/using_the_midl_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" <venom.zero.z***@gmail.com> a écrit dans le message de news: > 1163004700.613920.156***@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 > > 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" <venom.zero.z***@gmail.com> a écrit dans le message de news: 1163007729.369453.24***@k70g2000cwa.googlegroups.com...no, /newtlb is the default: /newtlb Generate new format type libraries (default) i tried to specify it explitly but nothing... Patrice wrote: Show quoteHide quote > 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/default.asp?url=/library/en-us/midl/midl/using_the_midl_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" <venom.zero.z***@gmail.com> a écrit dans le message de news: > 1163004700.613920.156***@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 > > 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: Show quoteHide quote > 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" <venom.zero.z***@gmail.com> a écrit dans le message de news: > 1163007729.369453.24***@k70g2000cwa.googlegroups.com... > 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/default.asp?url=/library/en-us/midl/midl/using_the_midl_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" <venom.zero.z***@gmail.com> a écrit dans le message de news: > > 1163004700.613920.156***@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 > > > 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" <venom.zero.z***@gmail.com> a écrit dans le message de news: 1163009344.620565.36***@m73g2000cwd.googlegroups.com...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: Show quoteHide quote > 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" <venom.zero.z***@gmail.com> a écrit dans le message de news: > 1163007729.369453.24***@k70g2000cwa.googlegroups.com... > 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/default.asp?url=/library/en-us/midl/midl/using_the_midl_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" <venom.zero.z***@gmail.com> a écrit dans le message de news: > > 1163004700.613920.156***@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 > > > 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: Show quoteHide quote > 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" <venom.zero.z***@gmail.com> a écrit dans le message de news: > 1163009344.620565.36***@m73g2000cwd.googlegroups.com... > 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" <venom.zero.z***@gmail.com> a écrit dans le message de news: > > 1163007729.369453.24***@k70g2000cwa.googlegroups.com... > > 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/default.asp?url=/library/en-us/midl/midl/using_the_midl_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" <venom.zero.z***@gmail.com> a écrit dans le message de news: > > > 1163004700.613920.156***@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 > > > > >i need to use the interface IInternteSession and many others... :/ i'm I wouldn't recommend doing that in managed code. The reason is the>trying to create a mime filter for ie in c# (actually in vb.net but the >language doesn't matter). 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/archive/2005/11/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. That's not a problem: i'm creating a browser. This mime filter will
affect just my process Mattias Sjögren ha scritto: Show quoteHide quote > >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/archive/2005/11/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.
What do you call nested If...Then search loops?
SortedList - bug or undocumented behavior ? DirctX 9.0 SDK And Visual Basic Idle time code collapsing in vb.net 2005 VB.NET Delegates Need help in developing an editor in VB.net Newbie: general requirements to write a program for video coding? Best practice, copy object, using a shadow Object for a undo functionality RadioButtonList |
|||||||||||||||||||||||