Usign old DLL in VC .NET App

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: H.B. (hbcrdv_at___hotmail__.com)
Date: 12/14/04


Date: Tue, 14 Dec 2004 15:30:34 -0500

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


Quantcast