Bonjour

j'ai un problème avec le Composant TComPOrt. Lorsque je compile j'ai l'erreur suivante dans fichier.Cpp: le projet.exe à trouver une classe d'exception EComPort avec le message 'unable to open Com Port (win error code:2)'

Il trouve l'erreur dans la ligne ci-dessous mentionné.

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
23
24
25
26
27
28
29
30
31
#include <vcl.h>
#pragma hdrstop
//---------------------------------------------------------------------------
USEFORM("SBI_RS232.cpp", MainForm);
//---------------------------------------------------------------------------
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
        try
        {
                 Application->Initialize();
                 Application->CreateForm(__classid(TMainForm), &MainForm);
                 Application->Run();
        }
        catch (Exception &exception)
        {
                 Application->ShowException(&exception);
        }
        catch (...)
        {
                 try
                 {
                         throw Exception("");
                 }
                 catch (Exception &exception)
                 {
                         Application->ShowException(&exception);
                 }
        }
        return 0;
}
//---------------------------------------------------------------------------
Merci pour votre aide.