Page 1 of 1

Installing xCodeJock enabled Applications

Posted: Mon Mar 08, 2010 6:12 am
by Retlaw
Do I have to install CodeJock on each clients PC when I use xCodJock?

Re: Installing xCodeJock enabled Applications

Posted: Mon Mar 08, 2010 8:13 am
by rdonnay
No. You simply need to distribute the OCX for each control and then register each OCX with regsvr32.exe. You can have your install program register the OCX's or you can have your Xbase++ program register them like this:

Code: Select all

   /// REGISTER ANY OCX
   cRegSvr := 'regsvr32.exe'
   aOcx := {{'rmchart.ocx','\CLSID\{4D814D0F-7D71-4E7E-B51E-2885AD0ED9D7}'},;
            {'CodeJock.Calendar.v13.0.0.ocx','\CLSID\{7B7990A4-9419-4F8C-A459-3E4644BCC35F}'},;
            {'CodeJock.SkinFramework.v13.0.0.ocx','\CLSID\{16378D39-12CF-4C7D-8769-DFAAF02FD1F5}'}}
   FOR i := 1 TO Len(aOcx)
      cRegQuery := DC_RegQuery(HKEY_CLASSES_ROOT,aOcx[i,OCX_CLSID],'')
      IF Valtype(cRegQuery) # 'C' .OR. Empty(cRegQuery)
        RunShell(aOcx[i,OCX_NAME]+' /s',cRegSvr)

        cRegQuery := DC_RegQuery(HKEY_CLASSES_ROOT,aOcx[i,OCX_CLSID],'')
        IF Valtype(cRegQuery) # 'C' .OR. Empty(cRegQuery)
          DC_WinAlert('Could not register '+aOcx[i,OCX_NAME])
        ENDIF
      ENDIF
   NEXT