Results 1 to 3 of 3

Thread: QtService start problem visual studio 2010

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2011
    Posts
    19
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default QtService start problem visual studio 2010

    Hi,
    I use QtService and QtServiceController classes.
    To start the service I use the function start() of QtServiceController and it runs without problem with visual studio 2008.
    The problem is with Visual Studio 2010. The lpServiceController->start() doesn't run.
    bool QtServiceController::start(const QStringList &args)
    {
    Q_D(QtServiceController);
    bool result = false;
    if (!winServiceInit())
    return result;

    // Open the Service Control Manager
    SC_HANDLE hSCM = pOpenSCManager(0, 0, SC_MANAGER_CONNECT);
    if (hSCM) {
    // Try to open the service
    SC_HANDLE hService = pOpenService(hSCM,(wchar_t *)d->serviceName.utf16(), SERVICE_START);
    ....
    hService in Visual Studio 2010 is null, in 2008 is ok.

    Suggestions?

    Thanks
    Teo

  2. #2
    Join Date
    Apr 2011
    Location
    Hyderabad, India
    Posts
    25
    Thanks
    7
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QtService start problem visual studio 2010

    same problem with me...Any solution after one year??

  3. #3
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: QtService start problem visual studio 2010

    This is a Windows API call failing. To get extended error information, call GetLastError.
    http://msdn.microsoft.com/en-us/libr...=vs.85%29.aspx

Similar Threads

  1. Qt add in Visual Studio 2010 problem
    By qtmude in forum Installation and Deployment
    Replies: 2
    Last Post: 18th January 2012, 14:41
  2. Qt and Visual Studio 2010
    By SixDegrees in forum Qt Programming
    Replies: 6
    Last Post: 15th November 2010, 19:56
  3. Visual Studio Plugin (1.1.6) crashes Visual Studio (2010)
    By mboeni in forum Installation and Deployment
    Replies: 0
    Last Post: 11th October 2010, 16:46
  4. Plan for Visual Studio 2010 (MSVC 2010)?
    By Vinzz in forum Qt Programming
    Replies: 1
    Last Post: 18th April 2010, 17:42
  5. problem building 2009.3.1 with visual studio 2010 beta
    By majestik666 in forum Installation and Deployment
    Replies: 2
    Last Post: 25th September 2009, 04:13

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.