CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2001
    Location
    CA,USA
    Posts
    60

    Hide function Names in COM

    Hi,
    I want to hide my COM components function names. This is a licensing component. Andbody can see the function name BOOL CheckLicense().
    Generate their fake component and use it.
    Can i hide this name so no one can go to OLE Viewer and See the Names of functions.
    Only my modules should access them.
    My Modules know the names because it is built by us.
    Any Help???


    Please rate the article if it is of any use to you. This encourages me to reply more and more and more.

  2. #2
    Join Date
    Oct 2000
    Location
    London, England
    Posts
    4,773

    Re: Hide function Names in COM

    BOOL CheckLicense isn't actually a COM interface (they always return HRESULT) but we'll assume it's an illustration.

    If you make your licence granter a separate COM component then yes, it will be easy for anyone go create a component using the same GUID and make that result always return TRUE.

    But why not make that component return a "secret" number or something else like that that is known only to your own software? Your software can also determine when the licence expires (if it does).

    By a number, I mean something likely to be 16-bytes long which is encrypted in some way known only to your own software. The chances of someone else producing a valid licence is therefore far more unlikely.



    The best things come to those who rate

  3. #3
    Join Date
    Oct 2001
    Location
    CA,USA
    Posts
    60

    Re: Hide function Names in COM

    Thanks a lot.
    We had that in mind. but i was thinking what
    that hidden in idl stands for.

    Please rate the article if it is of any use to you. This encourages me to reply more and more and more.

  4. #4
    Join Date
    Apr 1999
    Location
    Altrincham, England
    Posts
    4,470

    Re: Hide function Names in COM

    I don't have my books with me, so I can't check the details, but COM has a mechanism for licenced components - why can't you use that?

    He who breaks a thing to find out what it is, has left the path of wisdom - Gandalf
    Correct is better than fast. Simple is better than complex. Clear is better than cute. Safe is better than insecure.
    --
    Sutter and Alexandrescu, C++ Coding Standards

    Programs must be written for people to read, and only incidentally for machines to execute.

    --
    Harold Abelson and Gerald Jay Sussman

    The cheapest, fastest and most reliable components of a computer system are those that aren't there.
    -- Gordon Bell


  5. #5
    Join Date
    Oct 2001
    Location
    CA,USA
    Posts
    60

    Re: Hide function Names in COM

    You are right. But the license is on the use of it. Anyone can make a fake component and a fake function and use their fake component. SO the solution is to Encrypt the o/p of the license validator function.
    I will dfinately see into how the license works
    with the component itself.


    Please rate the article if it is of any use to you. This encourages me to reply more and more and more.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured