I need to programmatically (c++) start my desktop application once per week. With a parameter, on user context.
In Windows I have implemented this using TaskScheduler. This is close to what I have used: https://learn.microsoft.com/en-us/windows/desktop/taskschd/c-c-code-example-creating-a-task-trigger
I need to add same functionality for osx port. Can someone point to the Api that is exposing this functionality? I am targeting osx 10.12
Related
I have a Java app that uses a native interface to a C++ module to access native API features. The program is running on a windows 10 tablet computer that has an accelerometer. I want to access the sensor output and pass it to the java program. The windows module is a generic "Win32" module compiled using VC 2015 community edition and the latest windows 10 sdk.
Is this even possible or is the only way through their totally new "Universal App" system that is based on c# .net and xaml "coding" ???
I want subscribe to sensor events and receive callbacks or the tail end of a queue or pipe with the data.
I contribute to a cross-platform application which is built using wxWidgets stable version - 3.0.2.
I would like to enable the app to use the native fullscreen system on OS X Lion and above. This feature is implemented in current development versions of wxWidgets, but not in 3.0.2.
I understand that it should be possible to call the native Cocoa API from within the wxWidgets app to enable fullscreen mode, but I can't work out how to do so and can't find any information online.
How can I directly access the NSWindow class from my wxWidgets C++ code?
For reference, this question asks how to do the same with wxPython, and gets an answer - but python is different enough from C++ that I can't work out how I would do it in standard wxWidgets.
You can use wxWindow::MacGetTopLevelWindowRef() to get the NSWindow. See this commit for what you can do with it afterwards.
I need to figure out how to write functions to control access to resources on Windows 8.1. On Windows 7 and earlier versions, it seems I can use Access Control List related functions provided in Win32 API to write things like that,
C++ - How to set file permissions (cross platform)
but wonder how to do the same thing on the latest Windows 8.1, since Win32 is replaced by WinRT.
I'm considering using C++, but any suggestion to accomplish this task is welcomed.
Is there anyway I can do USB programming in Qt? I am using Qt Creator 2.6 which is based on Qt version 5.0.0 and it is the latest Qt Creator which works with the Microsoft Visual Studio 2010 compiler.
I have the toy called "Dreamcheeky Thunder Missile Launcher" and I need to program this USB based device.
I have tried LibUSB but it messed up everything. It even renamed the device port and I had to undo everything using USBDview software. But I guess I installed it incorrectly. I followed these instructions. It is instructions for 64 bit, but I got 32 bit and since the instructions seems not to have big difference (instead the download file) I followed it. This is what I downloaded - libusb-win32-bin-1.2.6.0.zip
Whatever the API you recommend it doesn't matter, even libusb, but please be kind enough to tell me how to install it properly.
My OS is windows 7 ultimate 32 bit.
ollo's answer is out of date. TL;DR is use libusb.info. A bit of explanation:
Originally there was libusb-0.1. Later they updated the API to libusb-1.0, but since libusb-0.1 had been around so long many projects didn't bother switching (kind of like Python 2/3). libusb-0.1 was not available for Windows, but libusb-1.0 is now available for all major platforms.
libusb-win32 is a port of libusb-0.1 to Windows. You shouldn't use it for new code.
libusb.org is the old website for libusb. The latest release is from 2012 and there are no Windows downloads.
libusb.info is the current website for libusb. It contains libusb-1.0 downloads for all platforms and you should use this for new code.
To further confuse things, the sourceforge libusb-win32 mailing list is still used for libusb.info's development.
There's another good instruction for libusb here: http://www.dreamincode.net/forums/topic/148707-introduction-to-using-libusb-10/
libusb:
libusb
libusb-win32 (windows port - use this on windows!)
If you stay on windows you can use
WinUSB:
WinUSB API
Example
Installation
For windows you can use both, but if your program has to be cross-platform you should use libusb.
I have a C++ application using the QT framework. I'm trying to add an option for the user to be able to set the program to start automatically on startup.
My development machine is running OS X 10.6.
As my main Mac reference, I'm using this Apple documentation. According to the documentation, there are two recommended ways of doing this. One is to use the Cocoa Shared Files List API, which works only on OS X 10.5 or higher. The other is to use the Carbon Apple Events API, which while not explicitly stated in the documentation, from my readings appears to work only on OS X 10.5 or lower.
According to this QT documentation I should be able to do this. However, I can't seem to figure out how to make either of these methods work.
For the Cocoa Shared Files List API, I followed the suggestions from this answer, but I can't seem to figure out what files to include that will get this working in my project. Things like LSSharedFileListRef are undefined. Is what I'm trying to do even possible from C++?
For the Carbon Apple Events API, I tried using the code that comes from Apple's own example. However, including doesn't seem to define all the things I need like all the examples online seem to suggest. For example, DescType is undefined, and the examples don't work. Is this because I'm on OS X 10.6?
Overall, what can I do to get my program to start on boot, ideally supporting all Macs OS X 10.4 and up?
If you want to support 10.4 and up, you need to use the Carbon Apple Events API.
The sample code you linked to worked on my OS X 10.6 box works without any problem, if you set the base SDK to 10.4u or 10.5. There are a few lines you need to remove if you want to compile it with 10.6 SDK, but if you want to support 10.4 and up, that's not what you want.
By the way, a user can easily set up a program to launch at the login time, by using the Account pane of the System Preferences. So, I don't think any need for you to provide the check box yourself.