fix(client/windows): CfConnectSyncRoot liefert Key als Return-Value
In windows-rs 0.58 hat CfConnectSyncRoot nur 4 Argumente und liefert den CF_CONNECTION_KEY direkt zurueck, keinen out-Parameter mehr. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
f9bf53803f
commit
8f70b047d8
|
|
@ -246,18 +246,16 @@ fn connect_callbacks(mount_point: &Path) -> Result<(), String> {
|
|||
let path_wide = U16CString::from_str(mount_point.to_string_lossy().as_ref())
|
||||
.map_err(|e| e.to_string())?;
|
||||
|
||||
let mut key = CF::CF_CONNECTION_KEY::default();
|
||||
unsafe {
|
||||
let key = unsafe {
|
||||
CF::CfConnectSyncRoot(
|
||||
PCWSTR(path_wide.as_ptr()),
|
||||
callbacks.as_ptr(),
|
||||
None,
|
||||
CF::CF_CONNECT_FLAG_REQUIRE_PROCESS_INFO
|
||||
| CF::CF_CONNECT_FLAG_REQUIRE_FULL_FILE_PATH,
|
||||
&mut key,
|
||||
)
|
||||
.map_err(|e| format!("CfConnectSyncRoot: {e}"))?;
|
||||
}
|
||||
.map_err(|e| format!("CfConnectSyncRoot: {e}"))?
|
||||
};
|
||||
*CONNECTION_KEY.lock().unwrap() = Some(key);
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue