1 Reply Latest reply: May 1, 2012 12:49 PM by Daniel Lipkie RSS

    Qlikview OCX 64 Bit

      Hi There,


      We are currently using a QlikView 32bit OCX control in a Win Forms Application.


      I have been asked to try the 64bit version.


      1. regsvr32.exe /u QlikOcx.ocx to remove the currently registered OCX (not sure if necessary but did)
      2. I downloaded the x64 QlikOcx.ocx (Version 10 SR3)
      3. I regsvr32.exe QlikOcx.ocx (and it registered without error)
      4. I even regsvr32.exe qvp.dll (even though I don’t know what it is)
      5. When I go to Choose Items in Visual Studio Toolbox the OCX does not appear in the list.
      6. If I try the above with the x86 QlikOcx.ocx (Version 10 SR3) the control appears in the list and I can drag it on the form no problems.


      Is there something different I should be doing with the 64bit OCX control?



        • Qlikview OCX 64 Bit

          We currently deliver a 32 and a 64 bit version of our application.


          Register the 32 bit. Use it to drag/drop onto Win Form. Delete the three wrapper dlls and manually create them


          Unfortunately there is a bug in Visual Studio 2010 and it does not properly generate wrappers for ocx files. So these wrappers need to be created using the utility, AxImp.exe. These wrappers are used to replace wrappers in Visual Studio as described below.


          Click Start, point to All Programs, point to Microsoft Visual Studio, point to Visual Studio Tools, and then click Visual Studio Command Prompt. This command prompt will use a PATH environment variable that makes AxImp.exe available as a command.


          To create these wrappers




          execute the following commands from the Visual Studio command prompt

                          cd C:\temp\QlikView\x86

          "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\AxImp" QlikOcx.ocx

          cd C:\temp\QlikView\x64

          "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\AxImp" QlikOcx.ocx

          Close the command prompt.


          Add the new dlls to your references.


          When you app fires up ... test for 32 or 64 bit mode and add the appropriate folder for 32 or 64 bit OCX to the path. Then when your app tries to use the OCX, Windows will use the path info to find the correct dll.


          During the VS build process the 32 bit installed app seems to be sufficient.


          The above requires you install/register the OCX before our app can be used.


          There also is a StartRegFreeOperation feature on the OCX that

          • allows you to instead put the OCX in a place near your application, no need to install/register the OCX at the user pc
          • In your app you point to that location via the path environment variable.
          • You call StartRegFreeOperation
          • Then when windows tries to invoke OCX code, it finds your local ocx.dll and uses it


          This makes distributing your app much easier.