Skip to main content

Crate vssetup

Crate vssetup 

Source
Expand description

Query Visual Studio setup for information on installed instances of Visual Studio.

This is a thin wrapper around the COM interface. Consult the Microsoft.VisualStudio.Setup.Configuration documentation for more information on the API.

To use this library you must first initialize COM. The helper, com::initialize will do this for you.

§Example

use vssetup::{com, HRESULT, SetupConfiguration};

fn main() -> Result<(), HRESULT> {
    com::initialize();
    let setup = SetupConfiguration::new()?;
    let instances = setup.EnumAllInstances()?;
    for instance in instances {
        let name = instance.GetDisplayName(0x400)?.to_string();
        println!("{name}");
    }
    Ok(())
}

Modules§

com
Helpers for initailizing and uninitalizing COM.

Macros§

wide_str

Structs§

BSTR
A BSTR string (BSTR) is a length-prefixed wide string.
EnumSetupInstances
FILETIME
HRESULT
An error code value returned by most COM functions.
SafeArray
An owned slice.
SetupConfiguration
The entry point for these APIs.
SetupErrorInfo
SetupErrorState
SetupFailedPackageReference
SetupInstance
SetupInstanceCatalog
SetupPackageReference
SetupProductReference
SetupPropertyStore
WideStr

Enums§

Variant