Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. DllRegisterServer does fail for QTActiveX
Qt 6.11 is out! See what's new in the release blog

DllRegisterServer does fail for QTActiveX

Scheduled Pinned Locked Moved General and Desktop
5 Posts 4 Posters 2.9k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    I created a QT ActiveX control using the VS2010 QT Plugin application wizard. The projcet did compile and link but registering the server failed. After some hours I created an empty global function DllRegisterServer in the project, since in meantime I was assuming I had to create the implementation of DllRegisterServer by myself. I got the error message that there are 2 implementations now. I deleted it again. I tried to create the project again and in fact the registration worked now and the AXControl was usable! After some changes I tried again to create the project and the error came up again. Then I observed that after leaving Visual Studio an starting it again (in admin mode) the creation of the project with registration works exactly one time. A second compilation gives the following error messages:

    _Creating library A:\DATA\VisualStudioProjects\Test\QTActiveX\Win32\Debug\QTActiveX.lib and object A:\DATA\VisualStudioProjects\Test\QTActiveX\Win32\Debug\QTActiveX.exp
    1> QTActiveX.vcxproj -> A:\DATA\VisualStudioProjects\Test\QTActiveX\Win32\Debug\QTActiveX.dll
    1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(744,5): warning MSB3075: The command "regsvr32 /s "A:\DATA\VisualStudioProjects\Test\QTActiveX\Win32\Debug\QTActiveX.dll"" exited with code 5. Please verify that you have sufficient rights to run this command.
    1> The previous error was converted to a warning because the task was called with ContinueOnError=true.
    1> Build continuing because "ContinueOnError" on the task "Exec" is set to "true".
    1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(756,5): error MSB8011: Failed to register output. Please try enabling Per-user Redirection or register the component from a command prompt with elevated permissions.
    1>
    1>Build FAILED.

    Does anybody know where this strange behaviour comes from?
    Thank you.

    1 Reply Last reply
    0
    • hskoglundH Offline
      hskoglundH Offline
      hskoglund
      wrote on last edited by
      #2

      Hi, you're using 64-bit Windows, I think registration using RegSvr32 of old style ActiveX controls requires Admin privileges :-(

      One solution is to create a simple .cmd bat-file that just contains the RegSvr32 command, and launch it with "Run as Administrator"; as suggested "here":http://stackoverflow.com/a/8822699/233402

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kenchan
        wrote on last edited by
        #3

        you could also run Visual Studio as Administrator.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @ kenchan that's a Bad Idea (™) You can break everything when developing as admin/root without even knowing it.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • ? Offline
            ? Offline
            A Former User
            wrote on last edited by
            #5

            Thank you for your replies. Unfortunately, everything that has been suggested I have already tried. Nothing works.
            As I said: When I start VS with admin rights the registration works one time. Then I have to leave VS and start it again. Then it works again one time. Looks like some files are locked.
            But anyway: This worked only after having declared DllRegisterServer manually in the project, building the project and deleting the declaration again afterwards.

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved