Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 513925
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:28:18+00:00 2026-05-13T07:28:18+00:00

We have an existing C++ application which uses WinAPI (let’s call it SvcApp). We

  • 0

We have an existing C++ application which uses WinAPI (let’s call it “SvcApp”). We have another C++ WinAPI application called “MgrApp” which installs and starts “SvcApp” as a Windows service.

However, we’d like to replace “SvcApp” with a Qt application. I may be misinformed, but it seems like it’s not possible to use <windows.h> from a Qt application, so it seems that I can’t just copy and paste all the existing code from “MgrApp”… or can I?

To summarize, we need to do the following from our Qt app:

  • Start/stop a windows service
  • Install/uninstall a windows service
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T07:28:18+00:00Added an answer on May 13, 2026 at 7:28 am

    You definitely can use Windows API (including windows.h) in Qt Applications. Behind the scenes Qt uses the Windows API. The normal way cross-platform Qt apps are handled is by using #ifdef blocks. Qt provides macros like Q_OS_WIN32 and Q_WS_MAC for this purpose. Look through the Qt source code and you will see this method used all over the place.

    EDIT: You may also want to look into using the command line utilities for installing/uninstalling and starting/stopping windows services. This way you can just use a QProcess to call it, and not have to delve into the WinAPI (which is always nice)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's say I have an existing application written in Java which I wish to
I have existing application which uses Sql server 2005 as a backend. It contains
I have an existing application which uses Sql Server 2005 as a back-end. It
I have an existing web application which uses window.showmodaldialog() to show certain forms and
I have an existing application which uses MS SQL stored procedures to enforce some
I'm supporting an existing application written by another developer and I have a question
I have a problem with an application which uses the same stored procedure over
I have a Winsock based server application which uses Windows Winsock I/O Completion Ports.
Note: This may sound dumb. I have an application which uses raw pointers and
I have a application which uses socket connection to send and receive data from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.