Function SHBindToParent

Source
pub fn SHBindToParent<T>(pidl: &PIDL) -> HrResult<(T, PIDL)>
where T: ole_IUnknown,
Available on crate feature shell only.
Expand description

SHBindToParent function.

ยงExamples

use winsafe::{self as w, prelude::*, co};

let _com_guard = w::CoInitializeEx(
    co::COINIT::APARTMENTTHREADED | co::COINIT::DISABLE_OLE1DDE)?;

let f = w::SHCreateItemFromParsingName::<w::IShellItem>(
    "C:\\Temp",
    None::<&w::IBindCtx>,
)?;

let pidl = w::SHGetIDListFromObject(&f)?;

let (f2, pidl2) = w::SHBindToParent::<w::IShellFolder>(&pidl)?;