question

BhabeshPatel-5481 avatar image
0 Votes"
BhabeshPatel-5481 asked XiaopoYang-MSFT commented

How to see COM function return value

I have created a COM project and generated tli file for the same,now i am using api of the project in different machine by importing the tli file.I want to see the return value of all the functions(COM),but in tli file return value is not present and I have only tli file of that project.

windows-api
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

XiaopoYang-MSFT avatar image
0 Votes"
XiaopoYang-MSFT answered XiaopoYang-MSFT edited

According to The Answer Of The SO Question, You need to split implementation and declaration by using the "no_implementation" and "implementation_only" parameters to #import. These generate .tlh (type library header) and .tli (type library implementation) files.




· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

So if I add implementation_only or no_implimentation,in generated tli file return value will be visible?

0 Votes 0 ·

MIDL compiler generates a .TLB file (type library) from an .IDL file. Than you

 #import "your_lib.tlb" no_implementation

in a header file Which Could have function prototypes.

 #import "your_lib.tlb" implementation_only

in a .cpp file Which Could have function Definitions.
More Details:Importing Files and Type Libraries


0 Votes 0 ·
BhabeshPatel-5481 avatar image
0 Votes"
BhabeshPatel-5481 answered XiaopoYang-MSFT commented

Let's say I am using any COM function fun(),how I will get all the details of that function as I will not have the cpp file.

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.