Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Errors porting code to Visual studio Express 2010

8 views
Skip to first unread message

Bruce Varley

unread,
May 7, 2012, 8:47:43 AM5/7/12
to
I have code that compiles fine under MSVC 6.0, that I'm trying to compile
under VS Express 2010 on another machine. Amongst the errors are a couple
that indicate that GENERIC_READ and GENERIC_WRITE are not being recognised.
If I include <windows.h> I get another raft of errors. What header files do
I need to include?

Here's the start of the code.

#include <StdAfx.h>

/* header file contains prototypes */
#include "C:\\C_Source\\SIO2011.h"

HANDLE hPort ;

bool InitPort (char* PortID)
{
hPort = CreateFile (
PortID,
GENERIC_WRITE | GENERIC_READ,
0,
NULL,
OPEN_EXISTING,
0,
0) ;

.... lots more code
}


Bruce Varley

unread,
May 7, 2012, 9:45:20 AM5/7/12
to

"Bruce Varley" <b...@NoSpam.com> wrote in message
news:s5GdnUgnSLLrWTrS...@westnet.com.au...
found the problem. windows.h works, but it has to *follow* StdAfx.


0 new messages