API encapsulation RRS feed

  • Question

  • Hello,

    I have an application consuming a winRT component, linking to a static Library. (App -> Cmp -> StatLib)

    Is there a way to encapsulate the api of the static Library, so that it is not visible to the application, but visible to the winRT component ?

    Thank you for your help

    Monday, November 26, 2012 8:43 AM

All replies

  • Does doing #pragma library ("StatLib.lib") in you winRT component help?

    I don't understand why you need this "encapsulate", since your application would not know the existance of StatLib if you don't let them know the header.

    Also, will create an internal namespace help?

    Monday, November 26, 2012 10:53 PM
  • Thank you, no, unfortunately I does not help. Well there is no headers, but from the app, they know the objects/functions of the sub-library, because of IntelliSense, so they can use the sub-library even though I do not want to let them use it.
    Wednesday, November 28, 2012 9:07 AM
  • I don't see anything else than to agree upon a password between my main Library and its sub-libraries.
    Wednesday, November 28, 2012 9:10 AM