Einzelnen Beitrag anzeigen

NicoDE
(Gast)

n/a Beiträge
 
#20

Re: C/C++ - Dll Importe und Procedurezeiger

  Alt 1. Jul 2004, 14:21
Zitat von Stevie:
Kann man nur in C++ dlls importieren?
Nope, dann muss man das extern "C" weglassen. Eine allgemeine Lösung für C/C++ sieht etwa so aus:
Code:
/* dll.h */
#ifndef DLL_INCLUDED
#define DLL_INCLUDED

/* #pragma lib "dll.lib" */

#ifdef __cplusplus
extern "C" {
#endif

__declspec(dllimport) __stdcall void FensterErstellen();

#ifdef __cplusplus
}
#endif

#endif /* DLL_INCLUDED */
  Mit Zitat antworten Zitat