retep998 / winapi-rs

Rust bindings to Windows API
https://crates.io/crates/winapi
Apache License 2.0
1.85k stars 392 forks source link

CopyFileTranslatedA takes LPCWSTR as a parameter type #1050

Closed fxtack closed 8 months ago

fxtack commented 11 months ago

winapi crate version: 0.3.9

Because I need to follow our project development guidelines, I must call functions that end in A and use regular characters (CHAR string).

When I called the CopyFileTransactedA function, I found that the path parameter type of this function is still WCHAR string (specifically LPCWSTR).

In fact, the parameters of CopyFileTransactedA and CopyFileTransactedW are completely identical.

CopyFileTransactedA: https://github.com/retep998/winapi-rs/blob/5b1829956ef645f3c2f8236ba18bb198ca4c2468/src/um/winbase.rs#L1694-L1702

If this issue can be resolved, I believe the winapi crate will become even more standardized. I look forward to your response!

Kreijstal commented 8 months ago

just use windows-rs

fxtack commented 8 months ago

just use windows-rs

Agreed, I've already done that.