iow4
Messages postés302Date d'inscriptionsamedi 22 octobre 2005StatutMembreDernière intervention 2 novembre 2008
-
14 janv. 2007 à 14:17
iow4
Messages postés302Date d'inscriptionsamedi 22 octobre 2005StatutMembreDernière intervention 2 novembre 2008
-
15 janv. 2007 à 20:35
Bonjour,
Je developpe actuellement une application multi-thread avec des délégués asynchrone. La fonction attachée au délégués prend en parametre un listViewItem qu'il doit ajouter à une listView present sur le thread principal. Le probleme c'est que je ne peux pas stocker le parametre dans un ListViewGroup : j'ai une exeption.
L'exception System.NullReferenceException n'a pas été gérée
Message="La référence d'objet n'est pas définie à une instance d'un objet."
Source="System.Windows.Forms"
StackTrace:
à System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
à System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
à MsnPasswordCracking.Form1.go(Object arg) dans C:\Documents and Settings\thom\Mes documents\Visual Studio 2005\Projects\MsnPasswordCracking\MsnPasswordCracking\Form1.cs:ligne 189
à System.Threading.ThreadHelper.ThreadStart_Context(Object state)
à System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
à System.Threading.ThreadHelper.ThreadStart(Object obj)
J'ai essayé de cloner l'item reçu en parametre dans la fonction du délegué : ça marche pas.
Merci d'avance pour votre aide