vJoyInterfaceWrap.vJoy.FfbRegisterGenCB C# (CSharp) Method

FfbRegisterGenCB() public method

public FfbRegisterGenCB ( WrapFfbCbFunc cb, IntPtr data ) : void
cb WrapFfbCbFunc
data System.IntPtr
return void
        public void FfbRegisterGenCB(WrapFfbCbFunc cb, IntPtr data)
        {
            wf = new WrapFfbCbFunc(cb);
            _FfbRegisterGenCB(wf, data);
        }

Same methods

vJoy::FfbRegisterGenCB ( FfbCbFunc cb, object data ) : void

Usage Example

Ejemplo n.º 1
0
        public FfbInterface(TesterForm dialog)
        {
            dlg = dialog;
            joystick = dialog.joystick;
            // FFB
            #if false
            #pragma warning disable 0618
            if (!joystick.FfbStart(id))
                throw new Exception(String.Format("Failed to start Forcefeedback on device {0}", id));
            #pragma warning restore 0618

            // Convert Form to pointer and pass it as user data to the callback function
            GCHandle h = GCHandle.Alloc(dialog);
            IntPtr parameter = (IntPtr)h;
            // joystick.FfbRegisterGenCB(OnEffect, parameter);
            joystick.FfbRegisterGenCB(OnEffectObj, dialog);
             #endif
        }