CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 1999
    Location
    France
    Posts
    393

    Prevent VB to change CLSID or AppId

    Hi,
    I would like to know if there is a way to prevent VB to change the clsid and AppId of an ActiveX(ocx,dll or EXE) even if the virtual table has been changed (remove of some functions, add/remove of some arguments in function).

    I know that we can use the binary compatibility, but VB comes over this when he decides that they can't be compatible.
    That's what i want to prevent. Since during development or test(DCOM) it is really easier to keep always the same id in order to keep the DCOM link always available and not to reconfigure it each time we make some little modifications.

    Thanks a lot!


  2. #2
    Join Date
    Mar 2009
    Posts
    1

    Re: Prevent VB to change CLSID or AppId

    Hello
    I am as well battling with this did you get a way to do this yet.. i make references to so many projects and afater every rebuild i have to select references... not good at all..
    i am however trying to write some C# application that will open the vbp and search for the clsiD then replace them with the once registered orvice versa..

    will appreciate your response..

  3. #3
    Join Date
    Sep 1999
    Location
    France
    Posts
    393

    Re: Prevent VB to change CLSID or AppId

    Sorry but found nothing. With C# you have to regenerate interop each time to get new methods.

    But with C#4 you may have a trick. http://blogs.msdn.com/b/samng/archiv...-in-c-4-0.aspx

    Good luck

  4. #4
    Join Date
    Jul 2006
    Location
    Germany
    Posts
    3,725

    Re: Prevent VB to change CLSID or AppId

    You go to menu 'Project->Properties' and select the 'Component' tab.
    There you find a section 'Version compatibility'
    You select Binary compatibility and reference the first executable (or dll) you have made as compatibility source. Then the compiler would keep the CLSID of the first binary you have created.

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