Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. ATL / WTL / STL
  4. Problem in registering a 32 bit C++ COM/ATL Service on Windows7 64 bit?

Problem in registering a 32 bit C++ COM/ATL Service on Windows7 64 bit?

Scheduled Pinned Locked Moved ATL / WTL / STL
c++helpquestioncomtools
4 Posts 2 Posters 0 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.
  • A Offline
    A Offline
    Aseem Sharma
    wrote on last edited by
    #1

    Hi friends, My product have a ATL/COM based C++ service (32 bit). It get registered and run fine on XP 32 bit and Vista 32 bit. But now I want to run the same on Windows7 64 bit also. I tried to register the service the following way: 1 I did Copy MyService.exe at C:\Windows\SysWOW64. 2 Then executing "C:\Windows\SysWOW64\MyService.exe" -RegServer from Start->Run 3 Then executing "C:\Windows\SysWOW64\MyService.exe" -Service from Start->Run But my service is not getting registered. While registering it, I don't get any error message. Also I didn't find any entry in event viewer (I saw event viewer first time. Don't know where to see the log about registration of my service). And I didn't find entry for my service at Control Panel\Administrative Tools\Services. Please advise me how can I register my service? Thanks in Advance Regards

    P 1 Reply Last reply
    0
    • A Aseem Sharma

      Hi friends, My product have a ATL/COM based C++ service (32 bit). It get registered and run fine on XP 32 bit and Vista 32 bit. But now I want to run the same on Windows7 64 bit also. I tried to register the service the following way: 1 I did Copy MyService.exe at C:\Windows\SysWOW64. 2 Then executing "C:\Windows\SysWOW64\MyService.exe" -RegServer from Start->Run 3 Then executing "C:\Windows\SysWOW64\MyService.exe" -Service from Start->Run But my service is not getting registered. While registering it, I don't get any error message. Also I didn't find any entry in event viewer (I saw event viewer first time. Don't know where to see the log about registration of my service). And I didn't find entry for my service at Control Panel\Administrative Tools\Services. Please advise me how can I register my service? Thanks in Advance Regards

      P Offline
      P Offline
      pacchij
      wrote on last edited by
      #2

      Did you install your service first? How was your service is installed in XP 32? Service is installed with CreateSerice() API. Check out how this was handled in XP 32 case. You can have your own logs during CreateService() API and see what went wrong in Win7 x64. I am not sure why you need to copy the MyService.exe in SysWow64 folder. Your service Dll\EXE can be anywhere.

      -Prashanth Jaligama

      A 1 Reply Last reply
      0
      • P pacchij

        Did you install your service first? How was your service is installed in XP 32? Service is installed with CreateSerice() API. Check out how this was handled in XP 32 case. You can have your own logs during CreateService() API and see what went wrong in Win7 x64. I am not sure why you need to copy the MyService.exe in SysWow64 folder. Your service Dll\EXE can be anywhere.

        -Prashanth Jaligama

        A Offline
        A Offline
        Aseem Sharma
        wrote on last edited by
        #3

        Hi Prashanth, Thanks for replying me. Finally I got the answer for my query. To run a command in Start->RUN (on Windows7 or Vista) with escalated rights we should press Ctrl+Shift+Enter. It will then run the command with admin rights. Earlier since I was pressing Enter only, service was not getting registered. About placing the service in SysWow64, since all my binaries are in SysWow64, I am placing the service's exe there only. Regards Aseem

        P 1 Reply Last reply
        0
        • A Aseem Sharma

          Hi Prashanth, Thanks for replying me. Finally I got the answer for my query. To run a command in Start->RUN (on Windows7 or Vista) with escalated rights we should press Ctrl+Shift+Enter. It will then run the command with admin rights. Earlier since I was pressing Enter only, service was not getting registered. About placing the service in SysWow64, since all my binaries are in SysWow64, I am placing the service's exe there only. Regards Aseem

          P Offline
          P Offline
          pacchij
          wrote on last edited by
          #4

          HI Aseem, Good to know that you solved your issue. alternatively you can elevate run prompt from Task Manager. Go to TaskManager click on Processes Tab Click on Show process from All users Go to File Menu->New Task This allows the execute command in admin mode. Thanks Prashanth

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups