Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to interop private members of COM Dll into .net dll?

Posted on 2006-06-21
5
Medium Priority
?
272 Views
Last Modified: 2006-11-18
Hello,

I am converting COM Dll to .net Dll using tlbimp... It only creates the wrapper for public members of the COM dll not for private members..
Can anyone tell me the way to get the private members too in the .net wrapper?

Thanks
0
Comment
Question by:garima_sikarwar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 25

Expert Comment

by:dstanley9
ID: 16951185
By design, it will not create a wrapper for private members since those aren't accessible outside the COM DLL anyway.  TLBIMP does not _convert_ the COM DLL, in only creates a WRAPPER, i.e. an interface to access the COM DLL.  The original COM DLL is still the one doing the work.
0
 
LVL 4

Author Comment

by:garima_sikarwar
ID: 16982859
yaa , thats true.. but is there any way to get the information abt private members of COM DLL...

one more thing, can we create .net wrapper dynamically ..I mean through the code ...
0
 
LVL 25

Accepted Solution

by:
dstanley9 earned 1000 total points
ID: 16984418
No, there is no way to get the private members.  That's why they're called private...  They wouldn't be accessible even if it was translated to .NET directly.  (Except through a reflection hack)

Do you have the source code?  How do you know what private members are there?

And yes, you can interop with most COM classes dynamically using late-binding:

http://www.c-sharpcorner.com/1/call_com.asp
http://www.codeguru.com/csharp/csharp/cs_syntax/reflection/article.php/c5881/
http://www.google.com/search?q=C%23+COM+late+binding

However, you're most likely going to need intimate knowledge of the COM classes before using them, so I don't know that it buys you a whole lot.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question