Questions tagged [win32-process]
The win32-process tag has no usage guidance.
314
questions
0
votes
0
answers
11
views
Strange behavior about CreateProcess
I intent to encapsulate a function to execute a command with C++.
code as below:
std::string ExecuteCommand(const std::string& command)
{
SECURITY_ATTRIBUTES saAttr;
HANDLE hReadPipe, ...
0
votes
0
answers
33
views
DnsQuery_A : Get all DNS entries in system using Windows kernel routine
I am trying to Get all DNS entries on system using some Windows kernel routine did not find is there kernel mode any routine for it.
I know there is user mode API DnsQuery_A/W where I can go ...
0
votes
0
answers
57
views
Visual Studio not building in Win32 OpenSSL 1.1.1u (Static)
I have tried to build my code in Visual Studio 2019 using Win32 solution platform with OpenSSL 1.1.1u (Static Library) but it resulted in a LNK2001: unresolved external symbol error
LNK2001 unresolved ...
0
votes
0
answers
37
views
Any way to receive message, being a process on SYSTEM user
So, is there any particular way to do this in Windows?
There's a service, that autostarts under SYSTEM user at every boot. By default, as stated at To schedule a task that runs with system permissions,...
0
votes
1
answer
79
views
Get network profile associated with a network adapter
I am looking for Windows network profiles associated with network adapters. I know there is the Windows API GetAdaptersAddresses() that gives adapter details, but it does not include the network ...
-3
votes
1
answer
391
views
How to enable your Windows Script Host through Registry Editor?
The error I'm getting:
Windows Script Host access is disabled on this machine. Contact your administrator for details.
From many websites you can find that making a file named: ["Enabled"] ...
0
votes
1
answer
60
views
How To Get lpBaseOfDll Of Module Using GetModuleInformation in Dart By win32 or ffi Library
I want the to get the lpBaseOfDll Of The Moudle But I Have The Issue In The Following Code I Need Help, pls.
the result of this code 'Pointer: address=0x0'
but i tried with python to get the ...
0
votes
1
answer
143
views
How to set Win32_ProcessStartup parameters in Powershell?
This is the PS-snippet that I have so far. Starting the detached process works fine, but I cannot set the ProcessStartupInformation. How can this be done? Also this code sometimes comes up with error ...
0
votes
0
answers
5
views
How deleting image.bmp with win32 api?
I created a window with three selection BUTTONS,three descriptive LABEL and a background image.bmp. obtained with
WM_PAINT,
BeginPaint()
....
EndPaint()
and an .rc file where there are data to load ...
5
votes
0
answers
149
views
Why is the WMI Win32_Process CommandLine property null for only some processes of other users?
I'm using this C# code to get the Command Line parameters of a running process:
public static void GetProcessesCommandLine(string processName)
{
string query = $@"SELECT CommandLine,ProcessId ...
0
votes
1
answer
66
views
Double hop marshaling in COM
Consider the following.
Process A is a COM client. It creates an object in process B
The object has a method that returns an interface pointer
The implementation in B creates an object in process C ...
1
vote
1
answer
57
views
Pass FILE_ATTRIBUTE constants to C runtime functions
I am trying to optimize a legacy application written in C which makes uses of regular stdio.h resp. fcntl.h functions. For special uses, I would like to inject a few extra hints from
https://learn....
0
votes
1
answer
75
views
For a Win32 Desktop C application, what is the best way to display messages when a program is ending
As an exercise, I'm trying to write a 100% correct Windows program. To that end, I'm checking the return values of every Win32 API call I use and report to the user if there are any problems.
This ...
0
votes
0
answers
50
views
0x80070005 E_ACCESSDENIED when debugging WinRT Windows.Net.Http on a Low Integrity Level process
Please see sample projects at https://github.com/jurocha-ms/LowILAccessDenied.
An E_ACCESSDENIED error is thrown when attaching a debugger (Visual Studio) to a Windows process with Low Integrity Level....
0
votes
1
answer
100
views
I have a question about the paramether of GetPriorityClass Function (and [in] attribute)
DWORD GetPriorityClass(
[in] HANDLE hProcess
);
In the documentation they says if the function succeeds, the return value is the priority class of the specified process.
The parameter takes [in] ...
0
votes
0
answers
165
views
Filter with Username in Win32_Process WQL Query
I want to ask any way can direct filter username in win32_Process WQL Query? If use looping with use GetOwner method is use much time to wait if too many user open same exe.
currently the query is ...
0
votes
1
answer
161
views
QT How to embed an application into QT widget which is a background-transparent widget that runs behind the main QT widget?
There is a 2 overlapping widgets (A and B widgets) and they are fully screen in the designer. I want to embed an application to the widget A which has a widget stack order lower than the widget B. So, ...
0
votes
0
answers
244
views
Failing SamConnect, SamOpenDomain, SamrQueryInformationDomain failing to link
I have windows c++ application for fetching password complexity
somehow it is failing with linker error
Not able find documented header by msdn, even I copy the function declaration it is failing with ...
0
votes
1
answer
177
views
SamQueryInformationDomain: get DOMAIN_PASSWORD_COMPLEX using _DOMAIN_PASSWORD_INFORMATION
I am trying to get Password Complexity, looking for WINAPI found SamQueryInformationDomain
But seems like there no public MSDN documentation for it. not header files. found soem C# code snippet here ...
-1
votes
1
answer
338
views
How to compile a python file with win32process(/api/gui) imports?
I was trying to compile a python script to a .exe using pyinstaller but no matter what I do I just can't seem to get it to work, it compiles it, the .exe gets created, but when I run it, it throws the ...
0
votes
1
answer
42
views
How to pass object to process output event
I have an ObservableCollection<Conversion> Queue, bound to ListBox control with ItemTemplate containing a TextBlock and a Button. When the button is clicked, a Win32 process starts. This process ...
0
votes
0
answers
322
views
Can not execute Windows gui process from service running under non-interactive account
I logged-in as UserA. There is service running under account UserB. When the service executes new process having gui, the new process starts without gui.
I expect it to behave as if I "run as&...
0
votes
0
answers
123
views
How to switch Input Method in Win32 Application Debug Console
I have a Win32 gui app and create a console to debug my program
when i switch to console, i want to change my input mode to Alphanumeric input mode automatic
i create my console use AllocConsole in ...
0
votes
1
answer
200
views
Can functions in a 32 bit dll be called from a 64 bit dll using the `LoadLibrary` function?
Can functions in a 32 bit dll be called from a 64 bit dll using the LoadLibrary function?
0
votes
1
answer
463
views
CreateCompatibleDC() or DeleteDC() fail in continues loop in Python - possible memory leak?
I am feeding an opencv window in a loop with this specific window screen capture routine below.
PROBLEM: after hundreds of cycles in the loop, it suddenly fail at either one of the two FAIL POINTS ...
0
votes
0
answers
274
views
Win32 API Not Properly Hooking Sockets
Hello im trying to Hook Sockets to read, and modify traffic from within my browsers (Chrome/IE). The Hooks are not working properly. Im not seeing any packets, Im not to sure what I'm doing wrong. I ...
1
vote
0
answers
94
views
WMI Remote Process Cannot Query Parent (Access Denied)
I have a .NET process that delegates work to other servers by creating a remote worker process on those servers and then sending the work over a TCP port. That all works fine, but I would like the ...
0
votes
0
answers
247
views
Identify subscribers(exe or processes) for winlogon
Hi I wanted to debug login delay
I can see eventvwr event like following that took around 50-60 secs to complete.
The winlogon notification subscriber <Profiles> finished handling the ...
1
vote
0
answers
110
views
win32 debug api: multithreaded debugging - set current thread
I am writing a little tracer using the Win32 Debug Api (not dbgeng). The general flow is:
DEBUG_EVENT event;
WaitForDebugEvent(&event);
...
ContinueDebugEvent(event.pid, event.tid,...)
My ...
0
votes
0
answers
347
views
fopen_s returns error code 2 with system account and win 32 but works fine on winx64 (c++)
I have a cpp program that uses fopen_s to open and read a file created under the directory C:\Windows\System32\config\systemprofile\AppData\Roaming.
My program needs to be compatible with winx64 and ...
0
votes
0
answers
84
views
Does a ConPTY reading pipe get notified on process termination?
So I am reading from a pipe which is connected to a PseudoConsole (ConPTY) and when process is done I want to stop.
In linux we get a EOF in such situation but in win32 we don't get any indication as ...
0
votes
0
answers
738
views
List all open file handles by directory on Windows
I am developing a C++ application on Windows server and I am trying to find ways to obtain which files are open by other processes. My current solution is inspired by code from the Chromium project. I ...
0
votes
1
answer
133
views
Debugging a Win32 application c++
My application started life as a c++ Console application in VS2019. Code was provided as part of an SDK. Worked perfect. Great response from the manufacturer USB device. Later, I wanted to graduate is ...
0
votes
1
answer
88
views
How can I wait for a Particular Pixel's Color to Load?
I am using Win32Api(Windows API) with C/C++.
I am able to take the pixel's RGB color.
void WaitForSinglePixel(int x, int y,COLORREF color) //Passing pixel's (X,Y) co-ordinate & the particular ...
0
votes
1
answer
319
views
Why is WriteFile not advancing the file offset for subsequent writes in this code?
I created an overlapped WriteFile scheme, where one thread fills a ring-buffer and advances the head-pointer and calls WriteFile, and another thread watches events from OVERLAPPED writes to advance ...
-1
votes
1
answer
541
views
SetWindowDisplayAffinity does not work for console app
I get accessdenied(5) error in following console app codes, is there anyway to protect console window against screenshot?
int wmain(void)
{
HWND hWnd = GetConsoleWindow();
BOOL b = ...
0
votes
0
answers
184
views
I am building win32 application which empties the clipboard when a screenshot is took.But the image is not emptying
I am building a Win32 application which empties the clipboard when a screenshot is taken. But the image is not emptying.
BOOL CALLBACK EnumWindowsProc(HWND hWnd, LPARAM lParam) //callback function
{...
-3
votes
2
answers
137
views
Can I use GetProcAdress to check which dll function is used in my process? [closed]
Can I use GetProcAdress to check which dll function is used in my process?
I want to detect a specific function from a running dll in my process.
GetProcAddress(GetModuleHandle(TEXT("any.dll"...
0
votes
1
answer
3k
views
import win32gui as wn in python 3.9
I have existing code that works in previous versions of Python using the following module call:
import win32gui as wn
I have upgraded to version 3.9
I get the error message: win32gui module not found
...
0
votes
1
answer
233
views
Win32Api Window Menu Activating issue
Running my program it runs and due to me having a menu with EXIT to Destroy the window it runs and immediately exits the window. Unsure how to fix my issue here on compiling the program to have it not ...
1
vote
1
answer
2k
views
What is Win32/Process.pm in @INC?
Setup
OpenDDS -3.14
Windows 10 64bit
Active Perl 5.8
VisualStudio 2019
I am trying to build OpenDDS and try out the messenger example as given in the instructions. The configure commanded executed, ...
0
votes
1
answer
410
views
GetProcessIoCounters errors out with code 998 [duplicate]
I am trying to get the PIO_COUNTERS for the current process by doing:
DWORD pid = GetCurrentProcessId();
auto handle = OpenProcess(PROCESS_ALL_ACCESS, 0, pid);
PIO_COUNTERS ctr = nullptr;
if (!...
-4
votes
1
answer
480
views
How can I manage windows of applications opened using Win32 API (Notepad, Word, Outlook, Chrome etc.)
How can we manage the wndproc function of the applications we run using the Win32 api? The software language I use is Go.
I tried more than one method but couldn't do it. Can you help?
I am learning ...
0
votes
1
answer
682
views
wmi win32_ process stdout python
Im trying to connect to remote windows machine, using win32_process to count number of files on desktop via command line of remote machine and get output.
I use WMI,
c=wmi.WMI('machine name',user='...
1
vote
1
answer
392
views
Windows memory metric to detect memory leak
We have large old legacy server code running as a 64bit windows service.
The service has a memory leak which, at the moment, we do not have the resources to fix.
As the service is resilient to restart,...
2
votes
2
answers
1k
views
Cipher suite selection in SChannel
I have implemented (Windows 10.0.17763.0/VS2017/C++) a client/server app which does secure communication using schannel. Now the requirement is to use only a set of cipher suites for the communication ...
1
vote
1
answer
330
views
Program to get all local users and their permission for the given file using win32 api in C programming
I'm trying to get all the users details and the privileges of the users for the given file. Something like thisoutput like this
How I'm supposed to print this using the GetSecurityInfo() provided by ...
0
votes
0
answers
482
views
How do i get the current session of the user inside a system process?
I have a DLL which is hosted inside a process which runs under Administrator context. The DLL recieves callbacks based on logged in user actions. GetUserName() returns the Admin username instead of ...
1
vote
0
answers
427
views
WPF Window goes behind previously activated window when any Window/Dialog/ProgressBar is shown on top of a Win32 window hosted using WindowsFormsHost
In the WPF application we are hosting third party application(Win32) using WindowsFormsHost control by setting a parent for the main window of that third party application.
Sample Code: ...
0
votes
1
answer
162
views
Two threads one uses stream Api and other thread CreateFile fails with error ERROR_SHARING_VIOLATION
In my current work, we have several threads running simultaneously,
Through one of the thread we have open a file:
std::ofstream fs;
fs.open(filename.c_str(), std::ofstream::out);
if( fs.is_open()...