Comment transformer un programme VB en Plugin ?

Comment transformer un programme VB en Plugin ? - VB/VBA/VBS - Programmation

Marsh Posté le 04-11-2009 à 11:27:35    

Bonjour,
 
 J'ai écris un petit programme en Visual Basic 2008.  Il affiche juste une petite fenêtre et fait quelques opérations.
 
 Je voudrais intégrer ce programme dans un autre programme qui propose d'intégrer des Plugins écris en VB .NET.
 
Le problème, c'est que autant je n'ai pas eu de problèmes particuliers pour écrire un programme stand-alone, autant le transformer en Plugin, je ne sais pas faire.
 
Le programme dans lequel je souhaite intégrer le plugin propose un SDK avec des outils pour cela, mais je ne comprends pas ce que je dois faire.
 
La description des étapes à réaliser (en anglais, désolé), d'après la doc du programme principal (et ce que j'ai fait)  
 
1. Create a new project of type Class Library.  OK, fait.
 
2. Add references to the following libraries:
— Add a reference to the assembly i2.TOTOTOTO.Plugins   OK, fait.
— Add a reference to the interop assembly Interop.TAATAAData   OK, fait.
 
3. Create a command, derived from i2TOTOPluginStandardCommand.
i2TOTOPluginStandardCommand is an abstract base class that implements the Ii2TOTOPluginCommand interface. A plug-in may
contain many command objects; each command object must have its own class derived from i2TOTOPluginStandardCommand.
 Heu ... Là, je suis perdu.  Comment dois-je créer la commande ?
 
4. Implement the Ii2TOTOPlugin interface.
This interface defines the top-level plug-in object. Exactly one class implementing this interface is required. Remember to add your command to the collection of commands in the main plug-in interface.  
 Pareil, je ne comprends pas ce que je dois faire.
 
5. Build the plug-in assembly.  Vu que je coince aux étapes 3 et 4, je ne peux pas créer l'Assembly.  Ce point ne devrait pas être trop compliqué.
 
Donc, actuellement, j'ai un programme VB qui fonctionne en mode standalone (une simple fenêtre qui s'ouvre).
 
Si j'ai bien compris, je dois transformer l'application pour la passer de "Type d'Application" = "Application Windows Forms" à "Bibliothèque de Classe".
 
Mais comment faire les étapes 3 et 4 ?
 
Merci de votre aide.

Reply

Marsh Posté le 04-11-2009 à 11:27:35   

Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed