Bonjours,
J'aimerai pour voir coder un code C en delphi mais je bloque a un point, si vous pourriez m'aider.
Donc voici le code en question :
Code C++ : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 #include "stdafx.h" #using <mscorlib.dll> #include <Winsnmp.h> #include <windows.h> using namespace System; SNMPAPI_STATUS CALLBACK cbFunc (HSNMP_SESSION hSession, HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam, LPVOID lpClientData) { return (SNMPAPI_SUCCESS); } int _tmain(){ ... }
Ce qui m'intéresse c'est la fonction cbFunc, elle est coder avant le main du C, mais en delphi quand je veut faire sa il m'envoie bouler voici mon code :
mais la il me dit :
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 type TForm1 = class(TForm) Memo1: TMemo; Button1: TButton; procedure Button1Click(Sender: TObject); private { Déclarations privées } public { Déclarations publiques } end; function cbFunc( hSession: HSNMP_SESSION; hWnd: HWND; wMsg: UINT; wParam: WPARAM; lParam: LPARAM; lpClientData: Pointer): SNMPAPI_STATUS;stdcall; var Form1: TForm1; implementation etc...Et j'ai encore un autre problème je ne sais pas comment coder se code[Erreur] Unit1.pas(25): Déclaration forward ou external non satisfaite : 'call'
Code C++ : Sélectionner tout - Visualiser dans une fenêtre à part smiUINT32 sysUpTime[] = {1,3,6,1,2,1,1,3,0};
si vous pouviez m'aider merci bien
Partager