public AutorunEventArgs(string drivePath, AutorunContent contentType, string label, int serial)
 {
     base.New(false);
     this.m_ContentType  = contentType;
     this.m_DrivePath    = drivePath;
     this.m_Label        = label;
     this.m_SerialNumber = serial;
 }
        /// <summary>
        /// Cette méthode est appelée quand l'Autoplay se déclenche pour un média connecté
        /// Cela permet aussi d'empêcher la suite de l'exécution de l'Autoplay
        /// </summary>
        /// <remarks>Cette méthode a au maximum 3 secondes pour répondre</remarks>
        public int IQueryCancelAutoPlay.AllowAutoPlay(string pszPath, AutorunContent dwContentType, string pszLabel, int dwSerialNumber)
        {
            //récupère les informations
            AutorunEventArgs e = new AutorunEventArgs(pszPath, dwContentType, pszLabel, dwSerialNumber);

            if (WantAutorun != null)
            {
                WantAutorun(this, e);
            }

            //si on veut annuler
            if (e.Cancel)
            {
                return(S_FALSE);
            }
            else
            {
                return(S_OK);
            }
        }