Results 1 to 4 of 4

Thread: OCX problem after second compile

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2000
    Posts
    20
    I've create a OCX (VB6) that itself registerd. ( Declare Function Regxxx Lib "xxx.OCX" Alias "DllRegisterServer" () As Long ). When i use it in a new project (NEWPRO also VB6) then is everything fine, but then when i change the OCX and compile it again NEWPRO can't load it anymore.
    > Whats going wrong ?
    > Must the registering manual done by specify the CLSID in the registry ?
    > Can you give a example incase it must manual ?

  2. #2
    Addicted Member Shrog's Avatar
    Join Date
    Aug 1999
    Location
    Darkest Africa
    Posts
    186

    Smile Compatibility

    The problem you are experiencing sounds like a compatibility issue.

    When you create an OCX, the system assigns a unique ID to the controls and classes that your component exposes. Your other program, that uses the control, looks at these ID's to make sure that it has the correct control.

    Every time you recompile the OCX, new ID's are assigned, so that your program that tries to use it does not recognize it and thinks it's the wrong control.

    To fix this, go to your peoject's properties. Select the Components tab. You will see a section entitled "Version Compatibility". You have to set it to "Binary Compatibility". This basically means that each time you compile, it will keep the same ID's.

    Hope this helps.
    Shrog

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Oct 2000
    Posts
    20
    Thanks a lot Shrog.

    Futher I wanna say when you do this check the path from the OCX that displays into the textbox or you've got a error like me at the first time.

    [Edited by Blue Attack on 11-27-2000 at 07:30 PM]

  4. #4
    Addicted Member Shrog's Avatar
    Join Date
    Aug 1999
    Location
    Darkest Africa
    Posts
    186

    Wink Oops...

    Sorry, I forgot to tell you.

    You could also have a look at this thread:

    http://forums.vb-world.net/showthrea...threadid=40110

    Shrog


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