Winbase.h and compilation errors 
Author Message
 Winbase.h and compilation errors

When I tried to compile a program that I am writing to perform serial
communications over the serial port of of a Windows 95 computer, I got
the compilation errors listed below.  Most of the errors were in the
Winbase.h include file.  I have not touched this header file.  This
header file was a standard header file supplied with my Visual C++ 5.0
development software.  I am developing my software on a Windows NT
Workstation (Service Pack 3).  Can anyone tell me what the problem may
be?

Also when I am using the "CreateFile" function, what file name
(lpFileName)should I supply when I am using this function to get a
HANDLE to my serial port.

Any help/assistance that you could give me would be greately
appreciated.

Charles Hightower
------------------------------
C:\Program Files\DevStudio\VC\INCLUDE\Winbase.h(194) : error C2061:
syntax error : identifier 'DWORD'
C:\Program Files\DevStudio\VC\INCLUDE\Winbase.h(195) : error C2282:
'DWORD' is followed by 'InternalHigh' (missing ','?)
C:\Program Files\DevStudio\VC\INCLUDE\Winbase.h(196) : error C2282:
'DWORD' is followed by 'Offset' (missing ','?)
C:\Program Files\DevStudio\VC\INCLUDE\Winbase.h(197) : error C2282:
'DWORD' is followed by 'OffsetHigh' (missing ','?)
C:\Program Files\DevStudio\VC\INCLUDE\Winbase.h(198) : error C2282:
'HANDLE' is followed by 'hEvent' (missing ','?)
C:\Program Files\DevStudio\VC\INCLUDE\Winbase.h(199) : error C2059:
syntax error : '}'
C:\Program Files\DevStudio\VC\INCLUDE\Winbase.h(202) : error C2061:
syntax error : identifier 'DWORD'
C:\Program Files\DevStudio\VC\INCLUDE\Winbase.h(203) : error C2282:
'LPVOID' is followed by 'lpSecurityDescriptor' (missing ','?)
C:\Program Files\DevStudio\VC\INCLUDE\Winbase.h(204) : error C2282:
'BOOL' is followed by 'bInheritHandle' (missing ','?)
C:\Program Files\DevStudio\VC\INCLUDE\Winbase.h(205) : error C2059:
syntax error : '}'
C:\Program Files\DevStudio\VC\INCLUDE\Winbase.h(208) : error C2061:
syntax error : identifier 'HANDLE'
C:\Program Files\DevStudio\VC\INCLUDE\Winbase.h(209) : error C2282:
'HANDLE' is followed by 'hThread' (missing ','?)
C:\Program Files\DevStudio\VC\INCLUDE\Winbase.h(210) : error C2282:
'DWORD' is followed by 'dwProcessId' (missing ','?)
C:\Program Files\DevStudio\VC\INCLUDE\Winbase.h(211) : error C2282:
'DWORD' is followed by 'dwThreadId' (missing ','?)
C:\Program Files\DevStudio\VC\INCLUDE\Winbase.h(212) : error C2059:
syntax error : '}'
C:\Program Files\DevStudio\VC\INCLUDE\Winbase.h(219) : error C2061:
syntax error : identifier 'DWORD'
C:\Program Files\DevStudio\VC\INCLUDE\Winbase.h(220) : error C2282:
'DWORD' is followed by 'dwHighDateTime' (missing ','?)
C:\Program Files\DevStudio\VC\INCLUDE\Winbase.h(221) : error C2059:
syntax error : '}'
C:\Program Files\DevStudio\VC\INCLUDE\Winbase.h(228) : error C2061:
syntax error : identifier 'WORD'
C:\Program Files\DevStudio\VC\INCLUDE\Winbase.h(229) : error C2282:
'WORD' is followed by 'wMonth' (missing ','?)
C:\Program Files\DevStudio\VC\INCLUDE\Winbase.h(230) : error C2282:
'WORD' is followed by 'wDayOfWeek' (missing ','?)
C:\Program Files\DevStudio\VC\INCLUDE\Winbase.h(231) : error C2282:
'WORD' is followed by 'wDay' (missing ','?)
C:\Program Files\DevStudio\VC\INCLUDE\Winbase.h(232) : error C2282:
'WORD' is followed by 'wHour' (missing ','?)
C:\Program Files\DevStudio\VC\INCLUDE\Winbase.h(233) : error C2282:
'WORD' is followed by 'wMinute' (missing ','?)
C:\Program Files\DevStudio\VC\INCLUDE\Winbase.h(234) : error C2282:
'WORD' is followed by 'wSecond' (missing ','?)
C:\Program Files\DevStudio\VC\INCLUDE\Winbase.h(235) : error C2282:
'WORD' is followed by 'wMilliseconds' (missing ','?)
C:\Program Files\DevStudio\VC\INCLUDE\Winbase.h(236) : error C2059:
syntax error : '}'
C:\Program Files\DevStudio\VC\INCLUDE\Winbase.h(238) : error C2143:
syntax error : missing ')' before '*'
C:\Program Files\DevStudio\VC\INCLUDE\Winbase.h(238) : error C2143:
syntax error : missing '{' before '*'
C:\Program Files\DevStudio\VC\INCLUDE\Winbase.h(238) : error C2059:
syntax error : ')'
C:\Program Files\DevStudio\VC\INCLUDE\Winbase.h(239) : error C2146:
syntax error : missing ')' before identifier 'lpThreadParameter'
C:\Program Files\DevStudio\VC\INCLUDE\Winbase.h(239) : error C2501:
'lpThreadParameter' : missing decl-specifiers
C:\Program Files\DevStudio\VC\INCLUDE\windef.h(114) : warning C4005:
'FAR' : macro redefinition
C:\GeminiWork\WorkingCode\MyWork\Source Files\serialio.c(95) : fatal
error C1004: unexpected end of file found
Error executing cl.exe.

serialio.obj - 33 error(s), 1 warning(s)

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Sun, 21 Apr 2002 03:00:00 GMT  
 Winbase.h and compilation errors

Quote:

>When I tried to compile a program that I am writing to perform serial
>communications over the serial port of of a Windows 95 computer, I got
>the compilation errors listed below.  Most of the errors were in the
>Winbase.h include file.  I have not touched this header file.  This
>header file was a standard header file supplied with my Visual C++ 5.0
>development software.  I am developing my software on a Windows NT
>Workstation (Service Pack 3).  Can anyone tell me what the problem may
>be?

If your source file is doing:

#include <winbase.h>

then try doing this instead:

#include <windows.h>

Quote:
>Also when I am using the "CreateFile" function, what file name
>(lpFileName)should I supply when I am using this function to get a
>HANDLE to my serial port.

On NT, use the following filename to open eg COM1:

\\.\\COM1

(note that in C/C++ this would be expressed as "\\\\.\\\\COM1")

On Win95, you use eg "COM1" as the filename



Sun, 21 Apr 2002 03:00:00 GMT  
 Winbase.h and compilation errors
Thanks Chris!
Your recommendations worked!

Charles



Quote:

> >When I tried to compile a program that I am writing to perform serial
> >communications over the serial port of of a Windows 95 computer, I
got
> >the compilation errors listed below.  Most of the errors were in the
> >Winbase.h include file.  I have not touched this header file.  This
> >header file was a standard header file supplied with my Visual C++
5.0
> >development software.  I am developing my software on a Windows NT
> >Workstation (Service Pack 3).  Can anyone tell me what the problem
may
> >be?

> If your source file is doing:

> #include <winbase.h>

> then try doing this instead:

> #include <windows.h>

> >Also when I am using the "CreateFile" function, what file name
> >(lpFileName)should I supply when I am using this function to get a
> >HANDLE to my serial port.

> On NT, use the following filename to open eg COM1:

> \\.\\COM1

> (note that in C/C++ this would be expressed as "\\\\.\\\\COM1")

> On Win95, you use eg "COM1" as the filename

Sent via Deja.com http://www.deja.com/
Before you buy.


Sun, 21 Apr 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Error whenever I include <winbase.h>

2. Missing Storage class error in winbase.h

3. Error whenever I include winbase.h

4. update: wince error with winbase.h

5. Error during compilation :BSCMAKE: error BK1506 : cannot open file

6. fatal error C1189: #error : MFC requires C++ compilation (use a .cpp suffix)

7. #include <winbase.h> gives me syntax errors in winbase.h

8. Compilation error - __gc type cannot be passed by value

9. winsock.h/winsock2.h compilation errors

10. TO Show a COMPILATION ERROR

11. help w/ compilation errors...

12. Compilation error CS0016 "Access denied"

 

 
Powered by phpBB® Forum Software