You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have no experience with windows api. I have tried the following code:
com::interfaces! {
#[uuid("255A76EC-9167-4034-89DE-06CF1B9930D0")]pubunsafe interface IidFisrvptr: IUnknown{pubfnVersion(&self) -> com::sys::HRESULT;
}}fnmain(){unsafe{let guid =
windows::Win32::System::Com::CLSIDFromProgID(windows::w!("TURING.FISR")).unwrap();let clsid = com::IID{data1: guid.data1,data2: guid.data2,data3: guid.data3,data4: guid.data4,};// let ppunk: *mut windows::core::IUnknown;init_apartment(ApartmentType::SingleThreaded).unwrap_or_else(|hr| panic!("Failed to initialize COM Library{:x}", hr));println!("Initialized apartment");// Get a `BritishShortHairCat` class factorylet factory = get_class_object::<IClassFactory>(&clsid).unwrap_or_else(|hr| panic!("Failed to get cat class object 0x{:x}", hr));println!("Got cat class object");// Get an instance of a `BritishShortHairCat` as the `IUnknown` interfacelet unknown = factory
.create_instance::<IUnknown>().expect("Failed to get IUnknown");println!("Got IUnknown");// Now get a handle to the `IAnimal` interfacelet fptr = unknown
.query_interface::<IidFisrvptr>().expect("Failed to get IAnimal");println!("Got Version String: {}", fptr.Version());// "Got Version String: x.x.x"}}
get a error:
Initialized apartment
Got cat class object
Got IUnknown
thread 'main' panicked at 'Failed to get IAnimal', src\bin\turing_com\mod.rs:45:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: process didn't exit successfully: `target\i686-pc-windows-msvc\debug\server.exe 8001\` (exit code: 101)
i don't know how to get interfaces's uuid, but i got 255A76EC-9167-4034-89DE-06CF1B9930D0 here:
The text was updated successfully, but these errors were encountered:
I have a activex dll. Register through:
For a long time I have been calling through
CreateObject ("TURING.FISR")
invbs
.vbs code:
I have no experience with windows api. I have tried the following code:
get a error:
i don't know how to get interfaces's uuid, but i got
255A76EC-9167-4034-89DE-06CF1B9930D0
here:The text was updated successfully, but these errors were encountered: