|C#||Visual Basic||Visual C++|
public static void SetPollfdNotifiers( MonoUsbSessionHandle sessionHandle, PollfdAddedDelegate addedDelegate, PollfdRemovedDelegate removedDelegate, IntPtr pUserData )
Public Shared Sub SetPollfdNotifiers ( _ sessionHandle As MonoUsbSessionHandle, _ addedDelegate As PollfdAddedDelegate, _ removedDelegate As PollfdRemovedDelegate, _ pUserData As IntPtr _ )
- addedDelegate (PollfdAddedDelegate)
- Function delegate for addition notifications.
- removedDelegate (PollfdRemovedDelegate)
- Function delegate for removal notifications.
- pUserData (IntPtr)
- User data to be passed back to callbacks (useful for passing sessionHandle information).
To remove notifiers, pass NULL values for the function pointers.
Note that file descriptors may have been added even before you register these notifiers (e.g. when a new MonoUsbSessionHandle is created).
Additionally, note that the removal notifier may be called during MonoUsbSessionHandle was created). If you don't want this, remove the notifiers immediately before calling MonoUsbSessionHandle.Close().(e.g. when it is closing file descriptors that were opened and added to the poll set when a new