IdentifiantMot de passe
Loading...
Mot de passe oubli� ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les r�ponses en temps r�el, voter pour les messages, poser vos propres questions et recevoir la newsletter

C++/CLI Discussion :

instancier une classe non manag�e dans une Windows Form


Sujet :

C++/CLI

  1. #1
    Membre averti
    Inscrit en
    D�cembre 2010
    Messages
    44
    D�tails du profil
    Informations forums :
    Inscription : D�cembre 2010
    Messages : 44
    Par d�faut instancier une classe non manag�e dans une Windows Form
    Bonjour,
    Je veux instancier une classe non manag� dans le load d'une winform, en incluant son header et mettre ce bout de code
    Code : S�lectionner tout - Visualiser dans une fen�tre � part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    #pragma endregion
     
    	private: PacketAfdx *P;
     
    		private: System::Void Form1_Load(System::Object^  sender, System::EventArgs^  e) 
    			 {
    				P->traficCapture();
     
    			 }
    et ce message d'erreur s'affche � l'�cran:
    Code : S�lectionner tout - Visualiser dans une fen�tre � part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    c:\program files\microsoft sdks\windows\v7.0a\include\servprov.h(96): error C2872: 'IServiceProvider' : ambiguous symbol
    1>          could be 'c:\program files\microsoft sdks\windows\v7.0a\include\servprov.h(53) : System::IServiceProvider IServiceProvider'
    1>          or       'c:\program files\reference assemblies\microsoft\framework\.netframework\v4.0\mscorlib.dll : System::IServiceProvider'
    1>c:\program files\microsoft sdks\windows\v7.0a\include\servprov.h(96): error C3699: '*' : cannot use this indirection on type 'IServiceProvider'
    1>          compiler replacing '*' with '^' to continue parsing
    1>c:\program files\microsoft sdks\windows\v7.0a\include\servprov.h(103): error C2371: 'IServiceProvider' : redefinition; different basic types
    1>          c:\program files\microsoft sdks\windows\v7.0a\include\servprov.h(53) : see declaration of 'IServiceProvider'
    1>c:\program files\microsoft sdks\windows\v7.0a\include\servprov.h(120): error C2872: 'IServiceProvider' : ambiguous symbol
    1>          could be 'c:\program files\microsoft sdks\windows\v7.0a\include\servprov.h(103) : IServiceProvider'
    1>          or       'c:\program files\reference assemblies\microsoft\framework\.netframework\v4.0\mscorlib.dll : System::IServiceProvider'
    1>c:\program files\microsoft sdks\windows\v7.0a\include\servprov.h(241): error C2872: 'IServiceProvider' : ambiguous symbol
    1>          could be 'c:\program files\microsoft sdks\windows\v7.0a\include\servprov.h(103) : IServiceProvider'
    1>          or       'c:\program files\reference assemblies\microsoft\framework\.netframework\v4.0\mscorlib.dll : System::IServiceProvider'
    1>c:\program files\microsoft sdks\windows\v7.0a\include\servprov.h(251): error C2872: 'IServiceProvider' : ambiguous symbol
    1>          could be 'c:\program files\microsoft sdks\windows\v7.0a\include\servprov.h(103) : IServiceProvider'
    1>          or       'c:\program files\reference assemblies\microsoft\framework\.netframework\v4.0\mscorlib.dll : System::IServiceProvider'
    1>c:\Program Files\Microsoft SDKs\Windows\v7.0A\include\urlmon.h(6459): error C2872: 'IServiceProvider' : ambiguous symbol
    1>          could be 'c:\program files\microsoft sdks\windows\v7.0a\include\servprov.h(103) : IServiceProvider'
    1>          or       'c:\program files\reference assemblies\microsoft\framework\.netframework\v4.0\mscorlib.dll : System::IServiceProvider'
    1>c:\Program Files\Microsoft SDKs\Windows\v7.0A\include\urlmon.h(6461): error C2872: 'IServiceProvider' : ambiguous symbol
    1>          could be 'c:\program files\microsoft sdks\windows\v7.0a\include\servprov.h(103) : IServiceProvider'
    1>          or       'c:\program files\reference assemblies\microsoft\framework\.netframework\v4.0\mscorlib.dll : System::IServiceProvider'
    Comment puis-je instancier une classe non manag�e dans une Windows Form

  2. #2
    Membre extr�mement actif
    Profil pro
    D�veloppeur informatique
    Inscrit en
    D�cembre 2008
    Messages
    1 022
    D�tails du profil
    Informations personnelles :
    Localisation : France, Mayenne (Pays de la Loire)

    Informations professionnelles :
    Activit� : D�veloppeur informatique
    Secteur : High Tech - �diteur de logiciels

    Informations forums :
    Inscription : D�cembre 2008
    Messages : 1 022
    Par d�faut Bonjour
    J'ai eu � r�soudre un probl�me du m�me style. Dans mon cas il s'agissait au sortir d'une form de positionner des variables non manag�es dans une form C++/CLI.
    je l'ai r�solue, vous pouvez aller sur le site microsoft qui a l'�tat de la chose
    http://http://social.msdn.microsoft....8-bfde358d0501

  3. #3
    Expert confirm�
    Homme Profil pro
    D�veloppeur informatique
    Inscrit en
    F�vrier 2005
    Messages
    5 515
    D�tails du profil
    Informations personnelles :
    Sexe : Homme
    �ge : 53
    Localisation : France, Val de Marne (�le de France)

    Informations professionnelles :
    Activit� : D�veloppeur informatique
    Secteur : Conseil

    Informations forums :
    Inscription : F�vrier 2005
    Messages : 5 515
    Par d�faut
    http://social.msdn.microsoft.com/For...8-bfde358d0501

    maestro_mirou a plus un probl�me de m�lange d'API que de m�lange de variable.
    PacketAfdx est peut-�tre une classe manag�e?

Discussions similaires

  1. R�ponses: 4
    Dernier message: 03/01/2013, 10h00
  2. R�ponses: 18
    Dernier message: 01/03/2012, 10h34
  3. R�ponses: 1
    Dernier message: 26/09/2007, 17h16
  4. Type DWord dans une classe non manag�
    Par julioMEL dans le forum C++/CLI
    R�ponses: 1
    Dernier message: 26/04/2007, 20h08
  5. R�ponses: 6
    Dernier message: 31/08/2006, 14h54

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo