windows

Why does os.path.exists() stop windows named pipes from connecting?

帅比萌擦擦* 提交于 2021-02-10 09:32:19
问题 It seems that a successful test of the existence of a windows named pipe by using os.path.exists() prevents the pipe from working. Why would this be? Here is successfully working windows named-pipe code: import time import multiprocessing as mp import win32pipe, win32file PIPENAME = r'\\.\pipe\Foo' def producer(pipe_name: str): print('producer') # if not os.path.exists(pipe_name): # print(f'No pipe {pipe_name}') # return pipe = win32file.CreateFile(pipe_name, win32file.GENERIC_READ |

flickering white areas when resizing Qt window

ぐ巨炮叔叔 提交于 2021-02-10 09:31:29
问题 I am observing a strange behavior when resizing QWindow . When I resize the window so that both width and height are increasing or decreasing, then the window does not flicker with white background. But when I increase width while decreasing height (or vice versa) the window flickers and temporarily fill the new are with white color. This is a very annoying effect especially when I have a dark theme in my application and I resize the window. To experiment with this I used "rasterwindow"

Passing WPARAM into DragQueryFile not compatible?

断了今生、忘了曾经 提交于 2021-02-10 09:26:26
问题 I'm kinda confused. When a file is dragged onto a window with WS_EX_ACCEPTFILES flagged it places a PostMessage into the WndProc function, which sets UINT message to WM_DROPFILES and, according to https://msdn.microsoft.com/en-us/library/windows/desktop/bb774303(v=vs.85).aspx the WPARAM = (WPARAM) (HDROP) hDrop; So am I wrong to assume that I can use the WPARAM to initialize the HDROP or just pass it into the DragQueryFile ?? LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam,

Passing WPARAM into DragQueryFile not compatible?

主宰稳场 提交于 2021-02-10 09:24:25
问题 I'm kinda confused. When a file is dragged onto a window with WS_EX_ACCEPTFILES flagged it places a PostMessage into the WndProc function, which sets UINT message to WM_DROPFILES and, according to https://msdn.microsoft.com/en-us/library/windows/desktop/bb774303(v=vs.85).aspx the WPARAM = (WPARAM) (HDROP) hDrop; So am I wrong to assume that I can use the WPARAM to initialize the HDROP or just pass it into the DragQueryFile ?? LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam,

Windows: How to symlink drive to another drive?

假装没事ソ 提交于 2021-02-10 08:27:09
问题 I have a client whose data has been moved from the H drive to the I drive, but their Access export script seems to have hardcoded the H drive as the destination even though it no longer exists on the new system. How would I create an H drive that maps to the I drive? I'm a unix/linux guy. I'm guessing something like mklink /d H: I: ? Would that work? 回答1: No, mklink isn't going to do it for you. What you need to do is to create a virtual hard drive (VHD) and copy the client's data to it. (Or

Numpy Installation for Python Ver-3.9 [duplicate]

痴心易碎 提交于 2021-02-10 07:50:08
问题 This question already has answers here : Installing numpy with pip on windows 10 for python 3.7 (3 answers) Closed 4 months ago . I'm trying to install NumPy but I'm facing an issue. The python ver I'm using is 3.9 and Windows version is 10. The error is as follows: C:>pip3 install numpy Collecting numpy Using cached numpy-1.19.2.zip (7.3 MB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing wheel metadata ... error ERROR: Command errored out with

Read memory of 64bit process address

十年热恋 提交于 2021-02-10 07:35:00
问题 I try to read memory at address of a process that's the code : std::cout << "Found Process " << procEntry32.szExeFile << " With process ID " << procEntry32.th32ProcessID << std::endl; hProc == OpenProcess(PROCESS_ALL_ACCESS, FALSE, procEntry32.th32ProcessID); pID = procEntry32.th32ProcessID; if (hProc == NULL) { std::cout << "failed getting handle" << std::endl; } CloseHandle(hProcSnap); std::cout << "hProcSnap handle closed ... " << std::endl; return true; Code Output I use DWORD64 This code

Read memory of 64bit process address

南笙酒味 提交于 2021-02-10 07:34:33
问题 I try to read memory at address of a process that's the code : std::cout << "Found Process " << procEntry32.szExeFile << " With process ID " << procEntry32.th32ProcessID << std::endl; hProc == OpenProcess(PROCESS_ALL_ACCESS, FALSE, procEntry32.th32ProcessID); pID = procEntry32.th32ProcessID; if (hProc == NULL) { std::cout << "failed getting handle" << std::endl; } CloseHandle(hProcSnap); std::cout << "hProcSnap handle closed ... " << std::endl; return true; Code Output I use DWORD64 This code

Keep node in running state even after user log-off

杀马特。学长 韩版系。学妹 提交于 2021-02-10 06:56:12
问题 How to keep a node application running in windows even when user logs off? Also how to keep running a node http-server even after user log-off? 回答1: You have 2 great options. One is as mentioned in comments above Forever. The other is PM2 which is easy to install and offers an incredible amount of options. I use this in all projects, but I cannot attest to the Windows version as I am on Linux & Ubuntu servers and work on a Mac. You can daemonize your node process, follow logs, cluster it and

WinError6 The Handle is Invalid Python 3+ multiprocessing

﹥>﹥吖頭↗ 提交于 2021-02-10 06:50:00
问题 I am running a Python 3.7 Flask application which uses flask_socketio to setup a socketio server for browser clients, another python process to connect to a separate remote socketio server & exchange messages, and another python process to read input from a PIR sensor. Both python processes communicate over multiprocessing.Queue - but, the socketio process always gets either [WinError6] - Invalid Handle or [WinError5] - Permission Denied . I have absolutely no idea what I'm doing wrong. Here