diff --git a/src/wrapper/vst3.rs b/src/wrapper/vst3.rs index e0987abf..35f9e5bd 100644 --- a/src/wrapper/vst3.rs +++ b/src/wrapper/vst3.rs @@ -90,12 +90,17 @@ impl IPluginFactory for Factory

{ unsafe fn create_instance( &self, - cid: *const vst3_com::IID, - _iid: *const vst3_com::IID, - obj: *mut *mut vst3_com::c_void, + cid: *const vst3_sys::IID, + _iid: *const vst3_sys::IID, + obj: *mut *mut vst3_sys::c_void, ) -> tresult { - return kResultFalse; - todo!() + if *cid != self.cid { + return kNoInterface; + } + + *obj = Box::into_raw(Wrapper::

::new()) as *mut vst3_sys::c_void; + + kResultOk } }