igorpastis
Messages postés19Date d'inscriptionjeudi 4 novembre 2004StatutMembreDernière intervention22 avril 2005
-
1 avril 2005 à 11:55
igorpastis
Messages postés19Date d'inscriptionjeudi 4 novembre 2004StatutMembreDernière intervention22 avril 2005
-
1 avril 2005 à 13:42
salut tout le monde
au secour !!!!
pourriez vous m'expliquer coment transformer un fichier .h créé avec visual c++ pour l'utiliser sous dev c++ !!!
ymca2003
Messages postés2070Date d'inscriptionmardi 22 avril 2003StatutMembreDernière intervention 3 juillet 20067 1 avril 2005 à 12:18
Normalement il n'y a rien à faire si ton entête utilise le C/C++ standard. Mainteant, s'il y a des trucs du genre __decspecl, ou autres trucs commençant avec des '_' il y aura sans doute des modifs à faire. En tout cas cela sera plus facile de répondre avec un exemple d'entête qui pose problème.
/////////////////////////////////////////////////////////////////////////////
// Type definitions
typedef signed short int comInt;
typedef comInt comHandle_t;
typedef struct _devConfig_t
{
int baud,databit,paritaet,stopbit;
int prot;
int sswh,swh,zt,qt,to,uew;
int empf,send;
BOOL drop;
} devConfig_t;
typedef devConfig_t *devConfig_p;
typedef void (CALLBACK *comNotifCall)(int event, int status, comHandle_t handle, int userID);
/////////////////////////////////////////////////////////////////////////////
// Interface für den T3964R Treiber
// Übernommen von ECCOM
#if defined(__cplusplus)
extern "C"
{
#endif
DLLROUTINE comInt DLLDECL ComOpen(LPCSTR com_name, int read_number, int write_number, HWND hwnd);
DLLROUTINE comInt DLLDECL ComRead(comHandle_t com_handle,void FAR *read_data,int read_number, long option);
DLLROUTINE comInt DLLDECL ComWrite(comHandle_t com_handle,void FAR *write_data,int write_number,long option);
DLLROUTINE comInt DLLDECL ComEnableEvent(comHandle_t com_handle,int com_event,int user_id,int msg);
DLLROUTINE comInt DLLDECL ComDisableEvent(comHandle_t com_handle,int com_event);
DLLROUTINE comInt DLLDECL ComGetNotify(WPARAM wParam,LPARAM lParam,int FAR *user_id_ptr,
int FAR *event_ptr,int FAR *state_ptr,int FAR *handle_ptr);
DLLROUTINE comInt DLLDECL ComClose(comHandle_t com_handle);
DLLROUTINE comInt DLLDECL ComGetVersion(char FAR *ver_string);
DLLROUTINE comInt DLLDECL ComString(char FAR *errs,comInt error,comInt typ);
DLLROUTINE comInt DLLDECL ComGetReadState(comHandle_t com_handle);
DLLROUTINE comInt DLLDECL ComGetWriteState(comHandle_t com_handle);
// Erweiterungen der API um die DLL an die neue Spezifikation anzupassen
// -> Konfiguration
// -> Verwendung von Event-Handles an Stelle von Windows-Nachrich´ten
// Kommentar:
//
// Dieses Interface ist übernommen vom EC-COM Treiberpaket das für Windows 3.11
// entwickelt wurde. Allerdings ist die Semantik leicht geändert. Dies ist
// vor allem nötig um die geänderte Treiberspezifikation zu berücksichtigen.
///////////////////////////////////////////////////////////////////////////////////
// Fehler- und Statusmeldungswerte nach EC-COM