Usign old DLL in VC .NET App

  • Thread starter Thread starter H.B.
  • Start date Start date
H

H.B.

Hi,

I have an existing DLL in C++ usign __declspec() macro to import/export
symbols. I want to call a function, in DLL, on a button click in main form
of a .NET C++ App. Seems pretty easy ...

The problem is that my function use types like "BYTE" and "HWND". In the
button click event function, these types are not recognized because
<windows.h> is not included. If a modify form1.cpp to force the inclusion of
<windows.h> before form1.h (where is the button click event function body) I
have ressources error at compilation!

I need some tips or a code sample to correct that.

Also, WHY functions bodies are in .h with C++ .NET projects ?

Thanks

Hugo
 
You can #undef the (very few) macros that conflict.

Ronald Laeremans
Visual C++ team
 
Back
Top