Skip to main content
Filter by
Sorted by
Tagged with
1 vote
3 answers
209 views

how can i get the pid of application after running it from start command? as an example, i launched firefox now i want to get the pid of firefox in return, how can i do it? my current approach is to ...
tribhuwan's user avatar
  • 386
1 vote
1 answer
83 views

Open a registry key to write to using create: pub fn main() -> Result<(), windows::core::Error> { let auto_start = windows_registry::CURRENT_USER.create("SOFTWARE\\Microsoft\\Windows\...
JFFIGK's user avatar
  • 704
1 vote
2 answers
163 views

I'm trying to make the NtOpenProcess syscall in rust using the windows-rs crate. I've got the following code but cannot figure out how to convert a u32 pid to a HANDLE type, which is needed for the ...
Tom Stock's user avatar
  • 1,300
1 vote
0 answers
99 views

As I understand it, COM objects have a "threadedness" that is associated with them when they are created. If an object needs to be handled on a certain thread, then method calls against that ...
laptou's user avatar
  • 7,107
0 votes
1 answer
141 views

Summary I try to implement this example: Register with the Routing Table Manager, but I get an error: Exception has occurred: W32/0xC0000005 Unhandled exception at 0x00007FFCFACEBCE4 (rtm.dll) in ...
ibigbug's user avatar
  • 124
0 votes
1 answer
120 views

I am trying to automate the installation of an Inno Setup, I have already been able to communicate with a Button and a Checkbox but I have been stuck for communication with a TNewCheckListBox. If I ...
Carotide's user avatar
4 votes
0 answers
237 views

I'm looking to fullscreen 3rd-party windows in a (hopefully) reliable and consistent way for a window manager project. The goal is to have the fullscreen window cover the taskbar completely. My ...
L. Berger's user avatar
  • 388
1 vote
1 answer
236 views

I am trying to Invoke the method Move on an Outlook MailItem Dispatch object and need to provide a MAPIFolder as an argument. I am able to call/get other methods/properties that do not require any ...
ricky's user avatar
  • 131
0 votes
0 answers
273 views

I've been using MSDN for the documentation, and I've also found EnumChildWindows, the rust documentation is a stub. My question is what the behavior of EnumWindows actually is. I've been under the ...
TimothyH 's user avatar
0 votes
1 answer
38 views

I am trying to get the ServerProperties member from a DNS_INTERFACE_SETTINGS3 struct. The documentation states to use GetInterfaceDnsSettings, and under the Settings parameter, it explicitly states ...
50Fifty's user avatar
  • 101
0 votes
1 answer
134 views

I'm trying to write a simple windows app in rust with windows-rs crate. I'd like to have a state wrapped in Counter struct and pass it to window_proc function. It is successful to retrieve the pointer ...
chengbin du's user avatar
1 vote
1 answer
78 views

I have started out with the Rust for Windows RSS reader example documented on Microsoft's website. It works as expected but is rather simplistic. I want to expand on this example, turn it into ...
Aven Arlington's user avatar
0 votes
0 answers
555 views

I'm using windows-rs (version 0.52.0). I wanted to capture certain events (in my case, a keyboard input) for the entire system (by that I mean not limited to a single window thread). To achieve it, I'...
Frytak's user avatar
  • 43
0 votes
0 answers
192 views

I'm new to both Rust and win32 (using windows-rs), and have been trying to understand both. However, I'm running into issues setting the icon for the window class I'm trying to create. The example ...
cookingboy3's user avatar
0 votes
3 answers
357 views

I'm trying to convert this function from C++ to Rust using the windows crate: #include <iostream> #include "windows.h" #include <RestartManager.h> #pragma comment(lib ,"...
anonymous's user avatar
0 votes
1 answer
174 views

I am trying to get a registry key using Windows API via the windows crate. But I am getting this error: Error: Error { code: HRESULT(0x80070057), message: "The parameter is incorrect." } ...
nrp's user avatar
  • 25
0 votes
1 answer
221 views

I'm trying to get the C++ D3D1211On12 example working using windows-rs, but I can't get the call to D3D11On12CreateDevice to return a valid ID3D11Device. The code I'm using is: fn create_d11_device(...
Shunyata Kharg's user avatar
0 votes
0 answers
148 views

So I setup windows hook for EVENT_SYSTEM_FOREGROUND event then in order to receive events from windows there must be message loop in the same thread, this requires setting up a window or using ...
dalvi's user avatar
  • 57
0 votes
1 answer
1k views

I'm trying to get executable path of process on Windows OS. I have window handle coming from some windows event, from window handle I can acquire process id using GetWindowThreadProcessId(). Then, ...
dalvi's user avatar
  • 57
0 votes
1 answer
226 views

I'm using the windows-rs, the official crate for Windows API. Usually I have no problem with data object initialization, I can use several way to do it, for example: let bitmap = BITMAP::default();...
abcjeff's user avatar
1 vote
1 answer
510 views

The windows crate, which provides Rust bindings to the Windows API, is split into a few internal crates, one of them being the windows-targets. This create is also split in a few internal crates, and ...
rodrigocfd's user avatar
  • 8,379
0 votes
2 answers
328 views

Here is my Rust code: use std::mem::ManuallyDrop; use windows::core::ComInterface; use windows::Win32::System::Com::*; use windows::Win32::UI::Shell::Common::ITEMIDLIST; use windows::{core::Result, ...
Jerome's user avatar
  • 37
0 votes
1 answer
584 views

Question I want to rewrite my project from C# to rust. But I stuck in Segmentation Fault situation. I think I misunderstood something, or meet crate limitation, hope for some help. Rust Code find ...
G.Jim's user avatar
  • 11
0 votes
1 answer
888 views

I'm trying to convert a *mut c_void to HWND (https://microsoft.github.io/windows-docs-rs/doc/windows/Win32/Foundation/struct.HWND.html) but it keeps throwing this error: mismatched types expected ...
AZ Developers's user avatar
0 votes
1 answer
474 views

I am trying to use the windows crate to set and get the pixel format descriptor of a window. When I pass None to the PPFD parameter, the return value is something reasonable (the maximum pixel format ...
Trevor's user avatar
  • 29