PDA

View Full Version : How to hide QAxServer details from .NET?



EgorSharin
15th February 2011, 07:24
I am creating a QAxServer and would like to expose it as an ActiveX component with some - but not all - of its slots and signals, to a .NET class library.
When I take a look inside the RCW (Runtime Callable Wrapper) created by Visual Studio from my Qt/ActiveX DLL, I see all signals and slots.

How can I hide the internal implementation, so that the .NET library has access only to the minimum required signals and slots, and keep the others invisible to .NET?

So, basically, provide access to a public API, but restrict access to internal implementation?

Thank you.

ChrisW67
15th February 2011, 22:31
Does it also expose slots declared private?

EgorSharin
16th February 2011, 22:50
Chris,
Thank you very much for your reply.

I tried to create 2 new slots: 1 public and 1 private.

Also, I created/added a test class which is *not* declared as ActiveX.

The resulting COM Interop assembly shows the public slot, but has no clue about the private slot and the "internal implementation" class! :D

Problem solved!!!

Thanks a lot!