public static Mutex FromBaseObject(BaseObject baseObj) { if (baseObj == null || baseObj.NativeObject == IntPtr.Zero) { return(null); } Mutex obj = baseObj as Mutex; if (object.Equals(obj, null)) { obj = new Mutex(CreatedWhenConstruct.CWC_NotToCreate); obj.BindNativeObject(baseObj.NativeObject, "CMutex"); obj.IncreaseCast(); } return(obj); }