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. Using UWP visual c .Dll

Using UWP visual c .Dll

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 342 Views
  • 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.
  • R Offline
    R Offline
    RiLev
    wrote on last edited by
    #1

    Hello everybody,

    I create a visual c UWP Dll that change the system time, because I didnt know how to do it in Qt but it work from visual c application and not work from qt UWP application

    I need help how to run UWP Task on visual c Dll from qt application

    Thanks

    jsulmJ J.HilkJ 2 Replies Last reply
    0
    • R RiLev

      Hello everybody,

      I create a visual c UWP Dll that change the system time, because I didnt know how to do it in Qt but it work from visual c application and not work from qt UWP application

      I need help how to run UWP Task on visual c Dll from qt application

      Thanks

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @RiLev said in Using UWP visual c .Dll:

      but it work from visual c application and not work from qt UWP application

      You forgot to mention what exact problem you have...

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • R RiLev

        Hello everybody,

        I create a visual c UWP Dll that change the system time, because I didnt know how to do it in Qt but it work from visual c application and not work from qt UWP application

        I need help how to run UWP Task on visual c Dll from qt application

        Thanks

        J.HilkJ Offline
        J.HilkJ Offline
        J.Hilk
        Moderators
        wrote on last edited by J.Hilk
        #3

        @RiLev

        so, why do you not use the c++ classes for that?

        #include "iostream"
        #include "windows.h"
        
        int main(int argc, char *argv[])
        {
            QApplication a(argc, argv);
        
            SYSTEMTIME st;
            GetSystemTime(&st);
        
            st.wDay = 1;
            st.wYear = 1988;
        
            bool timeSet = SetSystemTime(&st);
            if(!timeSet)
                qDebug() << "Last Error: " << GetLastError();
        
            return a.exec();
        }
        

        seems much easier than including a visual c dll into your project


        Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


        Q: What's that?
        A: It's blue light.
        Q: What does it do?
        A: It turns blue.

        R 1 Reply Last reply
        4
        • J.HilkJ J.Hilk

          @RiLev

          so, why do you not use the c++ classes for that?

          #include "iostream"
          #include "windows.h"
          
          int main(int argc, char *argv[])
          {
              QApplication a(argc, argv);
          
              SYSTEMTIME st;
              GetSystemTime(&st);
          
              st.wDay = 1;
              st.wYear = 1988;
          
              bool timeSet = SetSystemTime(&st);
              if(!timeSet)
                  qDebug() << "Last Error: " << GetLastError();
          
              return a.exec();
          }
          

          seems much easier than including a visual c dll into your project

          R Offline
          R Offline
          RiLev
          wrote on last edited by
          #4

          @J-Hilk

          The function SetSystemTime() not work on qt UWP application
          So I try to create Dll on visual c that will do it
          The function on UWP visual c is

          Windows.System.DateTimeSettings.SetSystemDateTime(dto);
          

          This function not work for me

          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