private PacDriveSingleton() { PacAttachedCallbackPtr = new PAC_ATTACHED_CALLBACK(PacAttachedCallback); PacRemovedCallbackPtr = new PAC_REMOVED_CALLBACK(PacRemovedCallback); PacSetCallbacks(PacAttachedCallbackPtr, PacRemovedCallbackPtr); Initialize(); }
private static void PacSetCallbacks(PAC_ATTACHED_CALLBACK pacAttachedCallback, PAC_REMOVED_CALLBACK pacRemovedCallback) { if (IntPtr.Size == 8) { PacSetCallbacks64(pacAttachedCallback, pacRemovedCallback); } else { PacSetCallbacks32(pacAttachedCallback, pacRemovedCallback); } }
private static extern void PacSetCallbacks32(PAC_ATTACHED_CALLBACK pacAttachedCallback, PAC_REMOVED_CALLBACK pacRemovedCallback);
public PacDrive(Control ctrl) { m_ctrl = ctrl; m_mode64 = Is64BitMode(); PacAttachedCallbackPtr = new PAC_ATTACHED_CALLBACK(PacAttachedCallback); PacRemovedCallbackPtr = new PAC_REMOVED_CALLBACK(PacRemovedCallback); if(m_mode64) PacSetCallbacks64(PacAttachedCallbackPtr, PacRemovedCallbackPtr); else PacSetCallbacks32(PacAttachedCallbackPtr, PacRemovedCallbackPtr); }
private static extern void PacSetCallbacks(PAC_ATTACHED_CALLBACK pacAttachedCallback, PAC_REMOVED_CALLBACK pacRemovedCallback);