Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

OCX Registering

We have a tool to register the SRP OCX controls on each workstation, all works fine.
I am wondering if there is any way we can check when the application starts that the controls are registered properly.
This is to avoid support calls when the "unable to display web page" display shows on the control.



  • I think some customers check the Version property of any control they have licensed and see if it returns a valid response.
  • I think Don's suggestion is probably the simplest.

    Here's something slightly more involved that I did instead, not for the same reason, but it might work for you.

    Obj = OleCreateInstance("SRP.ControlInfo") SRPUtilVersion = OleCallMethod(Obj, "GetProVersionNumber") Service = 'READ' Key = 'HKCR\SRP.Ribbon.1\CLSID' ValueName = Null$ Success = SRP_Registry(Service, Key, ValueName, ClsID, Error) Key = 'HKCR\CLSID\':CLSID:'\InprocServer32' ValueName = Null$ Value = Null$ Success = SRP_Registry(Service, Key, ValueName, RegPath, Error)

    As I have multiple copies of OI on my laptop, I got to a point where I kept forgetting which copy of the SRPcontrol was the "real" one. The first two lines above tell you what the version number of the actual pro control rather than the individual controls versions and the rest of it is to determine which control (which path) is actually registered.

    I just display the results in a nondescript text control in a backstage window. Doesn't encroach on anybody but I know where to look for it when I'm wondering. Probably belongs in a "Help", "About" type window.

    In your case, if you have an srp control on a window when you're first logging in, then use Don's suggestion.
    If you want to do something before that, then this approach might help
  • Thanks, I might give this a try.
  • I think Mark's use of the GetProVersioInfo method is close to my suggestion and is more universal. The Registry stuff is icing on the cake but isn't definitive as the control could be relocated.
  • Just to alleviate any concern, the control can be relocated, but those registry keys should never change. Otherwise, OI wouldn't be able to find the controls. The CLSID will never change either, so technically, once you've found the CLSID you want to check, you can hardcode it and avoid the first step of looking up the ProgID.
Sign In or Register to comment.