Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
1624 connectés 

  FORUM HardWare.fr
  Programmation

  Utilisation DLL sous VB !

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

Utilisation DLL sous VB !

n°78172
mario51
Posté le 04-12-2001 à 16:28:54  profilanswer
 

He oui, c'est encore moi !
 
Voila mon fichier C:
 
/********************************************************/
/*                   déclarations                       */
/********************************************************/
 
char* _stdcall recherche_sequentielle();
char* _stdcall decimal2binaire();
char* _stdcall decimal2chaine_continue();
void _stdcall creation_fichier_precalcule();
void _stdcall creation_index_fichier_precalcule();
 
 
/*************************************************
*******/
/*************************************************
*******/
void _stdcall creer_fichiers()
{
 
 creation_fichier_precalcule();
 creation_index_fichier_precalcule();
 
}
 
 
/********************************************************/
/*           creation du fichier précalculé             */
/********************************************************/
void _stdcall creation_fichier_precalcule()
{
 FILE* fp;
 char motif_temp[13]="";
 char chaine_temp[51]="";
 int i,j,k;
 
 if((fp=fopen("pre_calcule.bin","wb" ))==NULL)
  fputs("impossible d'ouvrir le fichier pre_calcule",stderr);
 ....
 
 
 
et voila mon fichier VB:  
 
Private Declare Function creer_fichiers Lib "mydll2.dll" ()
 
Private Sub bouton_fichiers_Click()
    creer_fichiers
    MsgBox ("Creation terminee !" )
End Sub
 
 
lorsque je lance le programme,  
il se deroule plutot bien (les fichiers que je veux sont crees) mais ensuite ERREUR : Convention d'appel de DLL incorrete  
 
HELP PLEASE!
 
MERCI !

mood
Publicité
Posté le 04-12-2001 à 16:28:54  profilanswer
 

n°78233
mario51
Posté le 04-12-2001 à 19:29:15  profilanswer
 

Up!

n°78247
cerdoc
Comment l'AK47 à changé ma vie
Posté le 04-12-2001 à 21:03:01  profilanswer
 

essaye ça peut etre:
 
Private Sub bouton_fichiers_Click()  
   dim dll as object
   Set dll = CreateObject("nom_du_projet.nom_de_la_classe" )
 
   dll.creer_fichiers  
   MsgBox ("Creation terminee !" )  
End Sub


---------------
I'm so crazy that sometime people think i'm clever.
n°78315
karlkox
Posté le 05-12-2001 à 02:37:02  profilanswer
 

cerdoc>il s'agit de VRAI dll et non de DLL activex, ton exemple ne marchera pas :)
 
 
Mario>envoye moi tes src C, je m'occupe du reste car la je peux pas vraiement savoir d'ou vient ton probleme.

n°78323
cerdoc
Comment l'AK47 à changé ma vie
Posté le 05-12-2001 à 08:07:25  profilanswer
 

ok


---------------
I'm so crazy that sometime people think i'm clever.
n°78332
Ciler
Posté le 05-12-2001 à 09:28:42  profilanswer
 

Avec un peu de malchance, le format de chaine en entrée de ta dll est un PChar...  
Dca priori impossible à rendre en VB


---------------
And I looked, and behold a pale horse: and his name that sat on him was Death, and Hell followed with him. Revelations 6:8
n°78339
karlkox
Posté le 05-12-2001 à 10:00:54  profilanswer
 

ciler>sisi, c'est tout a fait possible a récuperer (j'ai déja donné un exemple fonctionnel )


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation

  Utilisation DLL sous VB !

 

Sujets relatifs
[DLL] [VB / VC ] String ???[DLL] Comment faire communiquer plusieurs instance ???
[C et VB] question sur les DLLDLL : Comment fait on pour que ca marche??? [VC++6]
[DelphiX] utilisation de TDXDraw...[DelphiX] utilisation de TDXDraw...
[Visual C++6] Importation et Exportation de DLL ???requete SQL : utilisation SUM et traduction en calcul domaine
Cherche example builder C++ 4 de création de DLL[java & C++] utilisation .class java en C++
Plus de sujets relatifs à : Utilisation DLL sous VB !


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR