Je reprends car j'ai pas été clair...
Dans ma lib j'ai une structure déclarée comme ceci:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| struct infosTrame
{
char IHMPacketNumber[SIZE_BUF_PACKET_NUMBER];
char IHMTime[25];
char IHMlenghtUDP[25];
char IHMPacketLenght[25];
char IHMNameProtocole[25];
char IHMIPSrc[25];
char IHMPortUdpSource[25];
char IHMIPDst[25];
char IHMPPortUdpDestination[25];
char IHMnomMessage[200];
};
struct infosTrame Trame; |
Ensuite je l'a rempli dans une fonction comme ceci:
1 2 3 4 5 6 7 8 9 10
| strcpy(Trame.IHMPacketNumber,bufPacketNumber);
strcpy(Trame.IHMTime,bufTime);
strcpy(Trame.IHMlenghtUDP,lenghtUDP);
strcpy(Trame.IHMPacketLenght,bufPacketLenght);
strcpy(Trame.IHMNameProtocole,NameProtocole);
strcpy(Trame.IHMIPSrc,bufIPSrc);
strcpy(Trame.IHMPortUdpSource,NumeroPortUdpSource);
strcpy(Trame.IHMIPDst,bufIPDst);
strcpy(Trame.IHMPPortUdpDestination,NumeroPortUdpDestination);
strcpy(Trame.IHMnomMessage,nomMessage); |
J'aimerai appellé cett fonction de mon programme principal MFC pour pouvoir avoir acces a cette structure...
Et je ne sais pas comment faire.
Admettons que ma fonction soit void start_capture_offline
Déja: comment dois-je la definir?
void start_capture_offline(struct infosTrame,char* adresseOffLine,char* adresseCAP,char*adresseCsv,char *filtre, int capture_stop);
OU
void start_capture_offline(struct Trame,char* adresseOffLine,char* adresseCAP,char*adresseCsv,char *filtre, int capture_stop);
Ensuite comment je l'appelle?
Capture::start_capture_offline(Trame,adresseOffLine, adresseCAP,adresseCsv,filtre,capture_stop);
En ayant défini la même structure que ci dessus dans mon projet principal(d'où je fais l'appel)
Merci de m'ouvrir les yeux!!!
Partager