Big picture -- I have regular C++ code (some functions put in the namespaces) and I have C# code which should call this C++ stuff. As I was told the only way to do this is to write C++/CLI wrapper. Based on what I read I try to use the headers from reg.C++ and link against reg.C++ dll.
The first problem I have is HWND
. In reg.C++ it almost comes from thin air (I don't have even proper include for it, and VS accepts it), in CLI/C++ I explicitly added include path to c:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include\
(*) so I could add
#include <windef.h>
in C++/CLI code but it in turn includes winnt.h
and I got errors in this file. I sense I included reg.C++ into CLI/C++ code and it is not suitable for that.
So where there is HWND
definition for C++/CLI?
(*) This directory, because in reg.C++ project VS found the definition of HWND
there.
Update Later I installed Windows Development Kit 8.0, changed the paths to point to it, included windows.h
however then I got errors within the included files. For comparison I asked my colleague to create blank project for me, I added it to my solution and it worked. So I believe now is some odd thing with setup of my VS it cannot create properly CLI/C++ project.