|
Hello,
First of all, sorry for my English ^^
I'm blocked a problem with sending messages with SendInput and touch screens
Here is the detail of the problem :
I have an application that recovers touch inputs in Raw with "RegisterRawInputDevices"
Then I translate these entries into gestures such as a pan, scale in/out etc ...
Then, using gestures, I send mouse / keyboard messages with SendInput
The problem is that there is an system on the Windows side that does much the same thing, and it conflicts with my application.
For example, when I make a movement with 2 fingers on the touch screen, I send a mouse movement message with the average of the 2 points as position (see image)
<a href="https://ibb.co/DRxPfXp">ex1 — ImgBB</a>
The cursor is therefore positioned between my 2 fingers (green) but from time to time the cursor jumps to one of the 2 fingers (red)
It seems that the problem is related to <a href="https://docs.microsoft.com/fr-fr/windows/uwp/design/input/pen-and-stylus-interactions">wispv
I tried the technique indicate <a href="https://stackoverflow.com/questions/5120890/how-to-turn-off-all-touch-input-at-application-window-or-control-level/5128991#5128991">here</a>.
The TouchGate registry no longer exists in "Ordinateur\HKEY_CURRENT_USER\Software\Microsoft\Wisp\Touch"
But it is present here : Ordinateur\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Wisp\Touch
If I set the TouchGate value to 0 and restart the computer, this partly solves my problem because Windows no longer adds messages and I still have touch inputs from the Raw
The problem is that this technique requires a restart of the computer and that it is applied on the whole system whereas in the ideal I would only like to remove this layer for certain applications
I obviously tried to add this value in HKEY_CURRENT_USER and also tested the technique of updating windows with "SendMessageTimeout" and the message "WM_SETTINGCHANGE" but without success
Summary of my request
How to remove the system (wisp) or others multi touch overlay of Windows, dynamically (without restarting the machine)
|
|
|
|
|
Hi,
Member 14225757 wrote: How to remove the system (wisp) or others multi touch overlay of Windows, dynamically (without restarting the machine) I believe that TouchGate is implemented as a low altitude HID filter driver. The operating system will want to reboot to remove it from the chain. Even if you used the SetupAPI to remove it... a reboot is still recommeneded.
Best Wishes,
-David Delaune
|
|
|
|
|
Hi, everybody
I understand winsock has gethostbyname for this. But I need to debug for embedded application and first I try the code on Windows. Here is a my code:
sockaddr_in dns_addr;
int dns_size = sizeof(dns_addr);
ZeroMemory(&dns_addr, dns_size);
dns_addr.sin_family = AF_INET;
dns_addr.sin_port = htons(53);
dns_addr.sin_addr.s_addr = inet_addr("8.8.8.8");
SOCKET out = socket(AF_INET, SOCK_DGRAM, 0);
char msg[] = {
0x12, 0x34, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
0x77, 0x77, 0x77, 0x03,
0x74, 0x75, 0x74, 0x02,
0x62, 0x79, 0x00,
0x00, 0x01, 0x00, 0x01 };
int msg_size = sizeof(msg);
int iSendOk = sendto(out, msg, msg_size, 0, (sockaddr*)&dns_addr, dns_size);
if (iSendOk != SOCKET_ERROR)
{
char bufstr[100];
sockaddr_in dest_addr;
int dest_addr_size = sizeof(dest_addr);
int iReceived = recvfrom(out, bufstr, 100, 0,(sockaddr*)&dest_addr, &dest_addr_size);
}
closesocket(out);
And this code freezes when recvfrom function is execution. The function is executed with an infinite loop and never returns. What do I do wrong?
|
|
|
|
|
sockaddr_in dns_addr;
int dns_size = sizeof(dns_addr);
What's the "size" of the "uninitialized" dns_addr?
What other values can iSendOk take if it isn't SOCKET_ERROR?
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
You're right. Getting size of structure better after initialization. But in my cause this structure has constant length and her size will be same after initialization.
Second, I check other returning values but I cut this code for this example. When I'm debugging this code sendto function return 28. This value is equal to the length of sent data.
|
|
|
|
|
It is most likely that the remote device is not responding to the datagram. If there is no data to be read from the socket then recvfrom will block forever, or until the connection is broken. You should use a non-blocking method to check whether any data has been received and use some form of timed loop to allow the program to abort the activity after a fixed time period. See recvfrom function (winsock.h) - Win32 apps | Microsoft Docs[^] for full details.
|
|
|
|
|
I tried to specify the reading size to 1 byte instead 100 from example. But I got same result.
|
|
|
|
|
Of course you did. The socket is still waiting for a response from the remote address.
|
|
|
|
|
Does it mean that the DNS server does not respond if there is not a single byte in response? But why?
|
|
|
|
|
|
Hi,
The code you posted is implemented as a blocking socket. It will literally block the entire thread until it receives a response from the other side.
To avoid this you can set the SO_RCVTIMEO[^] socket option.
Best Wishes,
-David Delaune
|
|
|
|
|
Would anyone know how to obtain a HINTERNET handle I tried OpenInternet included wininet.h but got errors as there were #define openinternet openinternetW and the compiler said openinternetW not defined even though I saw the function prototype in wininet.h
thanks
|
|
|
|
|
I just looked at Wininet.h and there is no reference to OpenInternet, and neither Google nor MSDN appear to know about it. Which version are you working with?
|
|
|
|
|
Sorry my mistake its InternetOpen regardless intelisense is giving me a error #define internetOpen internetOpenW and internetOpenW is not defined
However looking at winInet.h
INTERNETAPI_(HINTERNET) InternetOpenA(
_In_opt_ LPCSTR lpszAgent,
_In_ DWORD dwAccessType,
_In_opt_ LPCSTR lpszProxy,
_In_opt_ LPCSTR lpszProxyBypass,
_In_ DWORD dwFlags
);
INTERNETAPI_(HINTERNET) InternetOpenW(
_In_opt_ LPCWSTR lpszAgent,
_In_ DWORD dwAccessType,
_In_opt_ LPCWSTR lpszProxy,
_In_opt_ LPCWSTR lpszProxyBypass,
_In_ DWORD dwFlags
);
#ifdef UNICODE
#define InternetOpen InternetOpenW
#else
#define InternetOpen InternetOpenA
#endif // !UNICODE
Whether my property page settings are Unicode or Multicharacter I still get the same error
Thanks
|
|
|
|
|
OK, I found it, and compiling with a call to InternetOpen() works fine. You need to gather, and show us, more information.
|
|
|
|
|
just started console application to see how I can obtain the FTP directory . one of the params was a HINTERNET handle
This is the code As for the property pages as I can not attach a picture I can only read off what I think is relevant
use of MFC - use standard windows libraries
Character Set Use Unicode character set
Windows SDK Version 10.0.17763.0
#include "pch.h"
#include <iostream>
#include "winInet.h"
int main()
{
std::cout << "Hello World!\n";
InternetOpen("DBGR", INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, INTERNET_FLAG_ASYNC);
}
This was the include directory generated by Visual Studio
Quote: C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\include
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\atlmfc\include
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\VS\include
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\shared
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\winrt
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\cppwinrt
C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\Include\um
|
|
|
|
|
This is a console application so it will be missing lots of definitions. You need to include windows.h before any of the other include files.
|
|
|
|
|
thank you on to the next step to see if I can get the FRP Directory
|
|
|
|
|
Hi
I just set up FTP on Windows 10 wonder if there are any registery setting for instance to find out the folder you set for your FTP Location
thanks
|
|
|
|
|
|
all I come up with searching is how to install FTP on Windows which I already did I tested it out from z/os yesterday using FTP client API EZAFTPKS the MSDN api to lets me know about folder change I was just thinking rather then hard code the folder that I am monitoring for changes I could get the FTP folder name from registry doesn't seem like there is an entry
|
|
|
|
|
Check the documentation to see if it refers to any config options. Application developers generally avoid using the registry these days.
|
|
|
|
|
|
|
With e.g. Ubuntu, it is simple: There is a single Docker base image, updated in step with the non-dockerized OS.
With Windows, you got a plethora of them: servercore, nanoserver, dotnet-framework, ... And it is difficult to tell which ones are meant as "general" bases, which ones are tailored to a (small or large) specific application area, which ones are more or less complete applications rather than primarily intended as base images.
The one-line description rarely tells more than the name does, and says nothing about how this alaternative compares to other alternatives.
Is there anywhere to be found a "comparison chart" over the various (general) Windows Docker base images, telling which features are included or not in each of them?
|
|
|
|