How to hide methods and properties from intellisense

Does anyone know how to properly hide classes, methods and properties from intellisense, while retaining the ability to name them; and therefore they do not appear in interop assemblies that are generated from the type library?

I am writing APIs for automatic testing, we don’t want to be shown to consumers yet. This seems to work well from the SaxBasic built-in editor that our application comes with, but will not hide objects, methods, and properties when the link is added to our interop assembly.

Here is an example of how I am trying to hide them; various permutations have been tried, thanks in advance!

[ object, uuid(guid), helpstring("help"), version(ver), dual, nonextensible, oleautomation, pointer_default(unique) ]IApplication.VisibleObj interface IObj : IDispatch { //tried [hidden] here, no luck [propget, id(91001), helpstring("Help str. Available as of Object Model Version XXX"), hidden]//again tried [hidden] here, no luck HRESULT Obj([out, retval] IObj** ppObj); } 
+6
c ++ interop com idl
source share
1 answer

It appears that Visual Studio 2008 and 2010 are now ignoring the "hidden" attribute, which makes hidden interfaces available. It seems that the interop assembly should be modified by using the following classes, methods, and properties that are meant to exist but not be viewable:

 [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 

Source: http://www.summsoft.com/blogs/garyvsta/archive/2009/02/06/preserving-hidden-elements-in-a-com-interop-assembly.aspx

+4
source share