COM tlb file
-
Hello everyone, Two questions about COM tlb file, 1. I am wondering what are the content of COM tlb file? I think it should be something like import library file (.lib) for a DLL which contains address and signature of exported functions. 2. Why for C# COM client, tlb file is not needed? Why for C/C++ (native) client, tlb file is needed? thanks in advance, George
-
Hello everyone, Two questions about COM tlb file, 1. I am wondering what are the content of COM tlb file? I think it should be something like import library file (.lib) for a DLL which contains address and signature of exported functions. 2. Why for C# COM client, tlb file is not needed? Why for C/C++ (native) client, tlb file is needed? thanks in advance, George
George_George wrote:
1. I am wondering what are the content of COM tlb file? I think it should be something like import library file (.lib) for a DLL which contains address and signature of exported functions.
you are somewhat right, yes it contain the decalartion of interface and related constant and enum. which vc++ compiler read to generate equivalent tlb and tlh files.
George_George wrote:
Why for C# COM client, tlb file is not needed? Why for C/C++ (native) client, tlb file is needed?
it not necessary to have tlb file even in vc++(native) to use com component, you can directly import com dll or add Header File geenrated by actual com workspace .
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief
-
George_George wrote:
1. I am wondering what are the content of COM tlb file? I think it should be something like import library file (.lib) for a DLL which contains address and signature of exported functions.
you are somewhat right, yes it contain the decalartion of interface and related constant and enum. which vc++ compiler read to generate equivalent tlb and tlh files.
George_George wrote:
Why for C# COM client, tlb file is not needed? Why for C/C++ (native) client, tlb file is needed?
it not necessary to have tlb file even in vc++(native) to use com component, you can directly import com dll or add Header File geenrated by actual com workspace .
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief
Thanks ThatsAlok,
ThatsAlok wrote:
it not necessary to have tlb file even in vc++(native) to use com component, you can directly import com dll or add Header File geenrated by actual com workspace .
If I have a C++ client and a C# COM component. Without a tlb file, how could the C++ client utilizing the C# COM component? I do not think it could be achieved by using header file, since C# does not have any header files. For managed C++ client, we could import DLL directly, but for unmanaged C++ client, how could we utilize C# COM interfaces/classes without a tlb? regards, George
-
Hello everyone, Two questions about COM tlb file, 1. I am wondering what are the content of COM tlb file? I think it should be something like import library file (.lib) for a DLL which contains address and signature of exported functions. 2. Why for C# COM client, tlb file is not needed? Why for C/C++ (native) client, tlb file is needed? thanks in advance, George
visit this http://207.46.196.83/MSDN/ShowPost.aspx?PostID=454035&SiteID=1[^]
There are only two kinds of people who are really fascinating-people who know absolutely everything, and people who know absolutely nothing. Oscar Wilde (1854-1900) Regards... Shouvik
-
visit this http://207.46.196.83/MSDN/ShowPost.aspx?PostID=454035&SiteID=1[^]
There are only two kinds of people who are really fascinating-people who know absolutely everything, and people who know absolutely nothing. Oscar Wilde (1854-1900) Regards... Shouvik
Thanks shouvik! I think only containing interface information is not enough. I think it should also contain the CLSID (implementation class guid of the interface) information, right? Or else, in client program, how could we know and pass both the IID and CLSID information to QueryInterface? regards, George
-
Thanks ThatsAlok,
ThatsAlok wrote:
it not necessary to have tlb file even in vc++(native) to use com component, you can directly import com dll or add Header File geenrated by actual com workspace .
If I have a C++ client and a C# COM component. Without a tlb file, how could the C++ client utilizing the C# COM component? I do not think it could be achieved by using header file, since C# does not have any header files. For managed C++ client, we could import DLL directly, but for unmanaged C++ client, how could we utilize C# COM interfaces/classes without a tlb? regards, George
George_George wrote:
For managed C++ client, we could import DLL directly, but for unmanaged C++ client, how could we utilize C# COM interfaces/classes without a tlb?
since c# com component deploy managed stuff, i believe might be you are not able to use it in c++ native.. but by the way... what C# dll is COM Server Exe or DLL
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief
-
Thanks shouvik! I think only containing interface information is not enough. I think it should also contain the CLSID (implementation class guid of the interface) information, right? Or else, in client program, how could we know and pass both the IID and CLSID information to QueryInterface? regards, George
Might be they have some wrap over class informations written within the COM component. I actually am more like a novice when it comes to COM. Please forgive me :-O
There are only two kinds of people who are really fascinating-people who know absolutely everything, and people who know absolutely nothing. Oscar Wilde (1854-1900) Regards... Shouvik
-
Might be they have some wrap over class informations written within the COM component. I actually am more like a novice when it comes to COM. Please forgive me :-O
There are only two kinds of people who are really fascinating-people who know absolutely everything, and people who know absolutely nothing. Oscar Wilde (1854-1900) Regards... Shouvik
Thanks all the same shouvik! Do you have any recommendations for learning resources? regards, George
-
George_George wrote:
For managed C++ client, we could import DLL directly, but for unmanaged C++ client, how could we utilize C# COM interfaces/classes without a tlb?
since c# com component deploy managed stuff, i believe might be you are not able to use it in c++ native.. but by the way... what C# dll is COM Server Exe or DLL
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief
Thanks ThatsAlok, I have tested that we could invoke C# (COM) function from C++ unmanaged code. regards, George
-
Thanks all the same shouvik! Do you have any recommendations for learning resources? regards, George
http://www.codeproject.com/com/COM_from_scratch_1.asp[^] http://www.codeproject.com/com/COM_from_scratch_2.asp[^] http://www.codeproject.com/com/COM_from_scratch_3.asp[^] http://www.codeproject.com/com/comintro.asp[^] http://www.codeproject.com/com/#Beginners[^] http://www.xml.com/pub/rg/COM[^] Hope the above resources help you out
There are only two kinds of people who are really fascinating-people who know absolutely everything, and people who know absolutely nothing. Oscar Wilde (1854-1900) Regards... Shouvik
-
http://www.codeproject.com/com/COM_from_scratch_1.asp[^] http://www.codeproject.com/com/COM_from_scratch_2.asp[^] http://www.codeproject.com/com/COM_from_scratch_3.asp[^] http://www.codeproject.com/com/comintro.asp[^] http://www.codeproject.com/com/#Beginners[^] http://www.xml.com/pub/rg/COM[^] Hope the above resources help you out
There are only two kinds of people who are really fascinating-people who know absolutely everything, and people who know absolutely nothing. Oscar Wilde (1854-1900) Regards... Shouvik
Thanks shouvik, great links! regards, George
-
Thanks ThatsAlok, I have tested that we could invoke C# (COM) function from C++ unmanaged code. regards, George
George_George wrote:
I have tested that we could invoke C# (COM) function from C++ unmanaged code.
I don't have much Experience in InterOpr!, but just want know what C~ compiler is producing, is it dll or exe
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief
-
George_George wrote:
I have tested that we could invoke C# (COM) function from C++ unmanaged code.
I don't have much Experience in InterOpr!, but just want know what C~ compiler is producing, is it dll or exe
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief
Hi ThatsAlok, I am using C++ unmanaged native exe and C# COM server. regards, George
-
Thanks ThatsAlok,
ThatsAlok wrote:
it not necessary to have tlb file even in vc++(native) to use com component, you can directly import com dll or add Header File geenrated by actual com workspace .
If I have a C++ client and a C# COM component. Without a tlb file, how could the C++ client utilizing the C# COM component? I do not think it could be achieved by using header file, since C# does not have any header files. For managed C++ client, we could import DLL directly, but for unmanaged C++ client, how could we utilize C# COM interfaces/classes without a tlb? regards, George
George_George wrote:
If I have a C++ client and a C# COM component. Without a tlb file, how could the C++ client utilizing the C# COM component?
Because the C# COM component implements
IDispatch
among other interfaces. With this one you have an automatized component, and you don't need to know the name of the method invoked, only their number (1, 2, 3, etc) which can be found in the extra information of the component, defined with IDL language.A polar bear is a bear whose coordinates has been changed in terms of sine and cosine. Quanehsti Pah Nation States
-
Hi ThatsAlok, I am using C++ unmanaged native exe and C# COM server. regards, George
George_George wrote:
I am using C++ unmanaged native exe and C# COM server.
try #import "Path to application with app name" and see if any .tlh and .tli file generated
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief
-
George_George wrote:
I am using C++ unmanaged native exe and C# COM server.
try #import "Path to application with app name" and see if any .tlh and .tli file generated
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief
Hi ThatsAlok, I have found there is no .tlh and .tli generated in C# COM server project. Do you know how to make then generated? regards, George
-
George_George wrote:
If I have a C++ client and a C# COM component. Without a tlb file, how could the C++ client utilizing the C# COM component?
Because the C# COM component implements
IDispatch
among other interfaces. With this one you have an automatized component, and you don't need to know the name of the method invoked, only their number (1, 2, 3, etc) which can be found in the extra information of the component, defined with IDL language.A polar bear is a bear whose coordinates has been changed in terms of sine and cosine. Quanehsti Pah Nation States
Thanks Fernando, In my C# COM Server project, no IDL file is generated, do you know how to generate it? regards, George
-
Hi ThatsAlok, I have found there is no .tlh and .tli generated in C# COM server project. Do you know how to make then generated? regards, George
George_George wrote:
I have found there is no .tlh and .tli generated in C# COM server project. Do you know how to make then generated?
look if this help How to call a COM C# component from VC++?[^].. and by the way the original name is Alok :)
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief
-
George_George wrote:
I have found there is no .tlh and .tli generated in C# COM server project. Do you know how to make then generated?
look if this help How to call a COM C# component from VC++?[^].. and by the way the original name is Alok :)
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief
Thanks ThatsAlok, good resource! regards, George