Usign old DLL in VC .NET App

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
 
R

Ronald Laeremans [MSFT]

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

Ronald Laeremans
Visual C++ team
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top