NiKLai
January 29th, 2007, 10:44 AM
Hi,
I'm having problem to declare a HANDLE in my project.
Actually, it's a C++ managed project (form based) in Visual Studio 2005. However, I need to deal with unmanaged C++ such as handles, events via SetEvents and CreateEvents, etc.
What I did is to include a new class in my project. I didn't use the keyword ref when I declared that class. Instead I simply used "public".
After that, I included <windows.h> in the .cpp of my class to get access to the desired function. I did also include <winnt.h> and <Kernel32.lib> to make sure every definitions I needed would be declared.
Well...when declaring a HANDLE, or when using SetEvent or CreateEvent, the compiler raise an error saying that those are undeclared identifiers.
What is strange, it's that the intellisense shows me these types as if everything would be ok.
Does anyone know how I can resolve my problem?
Thanks.
Nicolas
I'm having problem to declare a HANDLE in my project.
Actually, it's a C++ managed project (form based) in Visual Studio 2005. However, I need to deal with unmanaged C++ such as handles, events via SetEvents and CreateEvents, etc.
What I did is to include a new class in my project. I didn't use the keyword ref when I declared that class. Instead I simply used "public".
After that, I included <windows.h> in the .cpp of my class to get access to the desired function. I did also include <winnt.h> and <Kernel32.lib> to make sure every definitions I needed would be declared.
Well...when declaring a HANDLE, or when using SetEvent or CreateEvent, the compiler raise an error saying that those are undeclared identifiers.
What is strange, it's that the intellisense shows me these types as if everything would be ok.
Does anyone know how I can resolve my problem?
Thanks.
Nicolas