-
-
Notifications
You must be signed in to change notification settings - Fork 393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shell extensions? #1041
Comments
What exactly are you asking? That function does exist: https://docs.rs/winapi/latest/winapi/um/propsys/struct.IPropertyStore.html#method.SetValue |
@sollyucko Thank you for the quick response :) I'm asking how to make a shell extension that will register this function and allow me to call it. I think I have to make a dll and then register it. What I want to know is how to make that dll in Rust. Do I need to write a |
I will try to explain better. I want to create a shell extension, with just Rust, that will let me modify how Windows Explorer deals with reading details from a certain file type. But the issue is I don't know how to make something like that. |
You can use |
Awesome :) now what functions do I add here to make it work with the shell? |
Yeah, I guess so. I'm not very familiar with this, but I think these resources should help you get started:
|
This is good. Thank you. I'll let you know how it goes |
@sollyucko How to implement IClassFactory? https://www.tecgraf.puc-rio.br/iup/examples/shell_extensions/ClassFactory.cpp They did it here. I have to implement https://docs.rs/winapi/latest/winapi/um/unknwnbase/struct.IClassFactory.html somehow |
I'm not sure. Maybe use |
I'm gonna use https://raw.githubusercontent.com/GabrielMajeri/com-impl-rs for now. So I have to Rewrite-it-in-Rust for everything in that example you sent? |
I've started to remake all of it. I'm not sure it'll work because the macro doesn't tell me whether I'm using the correct function signatures or not. I may miss a |
I will post my progress at https://github.com/duckfromdiscord/midi-windows-ext periodically. for error[E0381]: used binding `hKey` isn't initialized
--> src\reg.rs:28:47
|
20 | let mut hKey: *mut HKEY;
| -------- binding declared here but left uninitialized
...
28 | KEY_WRITE, &mut security_attributes, hKey, 0 as *mut u32).try_into().unwrap());
| ^^^^ `hKey` used here but it isn't initialized
|
help: consider assigning a value
|
20 | let mut hKey: *mut HKEY = todo!();
| |
Yeah, probably, unless you want to deal with C++ FFI.
Just keep in mind that
You're trying to directly read the value of an uninitialized variable. Assuming you're trying to have the handle end up directly in
|
Thank you very much. |
We don't have |
winapi does have
I think the |
Looks like somehow, between the last time I was looking at this code 3 weeks ago, and today, they privated all the code. |
This is my first time working w/ the Windows API so bear with me.
Is there a way to make a shell extension in winapi? I want to use IPropertyStore::SetValue to add info to the Details pane when you try to view a certain type of file's properties.
It looks like winapi isn't being maintained very much anymore but I thought I would ask.
The text was updated successfully, but these errors were encountered: