S
Steve Richter
using vs2005, the wizard created a c++ forms project for me. Now in
the form1.h file I have a menu item click handler that I would like to
add some win32 api code to:
private: System::Void
tapeToolStripMenuItem_Click( System::Object^ sender,
System::EventArgs^ e)
{
HANDLE hTape = CreateFile( "\\\\.\\TAPE0", GENERIC_READ |
GENERIC_WRITE,
0, NULL, OPEN_EXISTING, 0, NULL);
}
What header file do I use for the HANDLE and DWORD macros? Where do I
place the #include stmts in the form1.h file?
I need to use other win32 APIs like SetTapePosition and I got the
function declaration to be accepted in the main project .cpp file.
But linkage failed because of "unresolved externals
SetTapePosition". How do I add kernel32 to my project?
( I actually used to code Visual C++ for a number of years. The
executable code in the form1.h file is what is confusing me the
most. )
thanks,
-Steve
the form1.h file I have a menu item click handler that I would like to
add some win32 api code to:
private: System::Void
tapeToolStripMenuItem_Click( System::Object^ sender,
System::EventArgs^ e)
{
HANDLE hTape = CreateFile( "\\\\.\\TAPE0", GENERIC_READ |
GENERIC_WRITE,
0, NULL, OPEN_EXISTING, 0, NULL);
}
What header file do I use for the HANDLE and DWORD macros? Where do I
place the #include stmts in the form1.h file?
I need to use other win32 APIs like SetTapePosition and I got the
function declaration to be accepted in the main project .cpp file.
But linkage failed because of "unresolved externals
SetTapePosition". How do I add kernel32 to my project?
( I actually used to code Visual C++ for a number of years. The
executable code in the form1.h file is what is confusing me the
most. )
thanks,
-Steve