I am trying to compile the following code:
Code:
#include <ras.h>
bool IsConnected()
{
LPRASCONN TRasCon;
RASCONNSTATUS Tstatus;
DWORD lg;
DWORD lpcon;
bool lReturn;
TRasCon->dwSize = 412;
lg = 256 * TRasCon->dwSize;
lReturn = false;
if( RasEnumConnections(TRasCon, &lg, &lpcon) == 0 )
{
Tstatus.dwSize = 160;
RasGetConnectStatus(TRasCon->hrasconn, &Tstatus);
lReturn = ( Tstatus.rasconnstate == 0x2000 );
}
return( lReturn );
}
And I get the following errors:
Quote:
c:\program files\microsoft visual studio\vc98\include\ras.h(47) : error C2065: 'HRASCONN' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\ras.h(47) : error C2501: 'DECLARE_HANDLE' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(56) : error C2146: syntax error : missing ';' before identifier 'dwSize'
c:\program files\microsoft visual studio\vc98\include\ras.h(56) : error C2501: 'DWORD' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(56) : error C2501: 'dwSize' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(57) : error C2146: syntax error : missing ';' before identifier 'hrasconn'
c:\program files\microsoft visual studio\vc98\include\ras.h(57) : error C2501: 'HRASCONN' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(57) : error C2501: 'hrasconn' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(58) : error C2146: syntax error : missing ';' before identifier 'szEntryName'
c:\program files\microsoft visual studio\vc98\include\ras.h(58) : error C2501: 'WCHAR' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(58) : error C2501: 'szEntryName' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(73) : error C2146: syntax error : missing ';' before identifier 'dwSize'
c:\program files\microsoft visual studio\vc98\include\ras.h(73) : error C2501: 'DWORD' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(73) : error C2501: 'dwSize' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(74) : error C2146: syntax error : missing ';' before identifier 'hrasconn'
c:\program files\microsoft visual studio\vc98\include\ras.h(74) : error C2501: 'HRASCONN' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(74) : error C2501: 'hrasconn' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(75) : error C2146: syntax error : missing ';' before identifier 'szEntryName'
c:\program files\microsoft visual studio\vc98\include\ras.h(75) : error C2501: 'CHAR' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(75) : error C2501: 'szEntryName' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(154) : error C2146: syntax error : missing ';' before identifier 'dwSize'
c:\program files\microsoft visual studio\vc98\include\ras.h(154) : error C2501: 'DWORD' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(154) : error C2501: 'dwSize' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(156) : error C2146: syntax error : missing ';' before identifier 'dwError'
c:\program files\microsoft visual studio\vc98\include\ras.h(156) : error C2501: 'DWORD' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(156) : error C2501: 'dwError' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(157) : error C2146: syntax error : missing ';' before identifier 'szDeviceType'
c:\program files\microsoft visual studio\vc98\include\ras.h(157) : error C2501: 'WCHAR' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(157) : error C2501: 'szDeviceType' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(158) : error C2146: syntax error : missing ';' before identifier 'szDeviceName'
c:\program files\microsoft visual studio\vc98\include\ras.h(158) : error C2501: 'WCHAR' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(158) : error C2501: 'szDeviceName' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(167) : error C2146: syntax error : missing ';' before identifier 'dwSize'
c:\program files\microsoft visual studio\vc98\include\ras.h(167) : error C2501: 'DWORD' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(167) : error C2501: 'dwSize' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(169) : error C2146: syntax error : missing ';' before identifier 'dwError'
c:\program files\microsoft visual studio\vc98\include\ras.h(169) : error C2501: 'DWORD' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(169) : error C2501: 'dwError' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(170) : error C2146: syntax error : missing ';' before identifier 'szDeviceType'
c:\program files\microsoft visual studio\vc98\include\ras.h(170) : error C2501: 'CHAR' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(170) : error C2501: 'szDeviceType' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(171) : error C2146: syntax error : missing ';' before identifier 'szDeviceName'
c:\program files\microsoft visual studio\vc98\include\ras.h(171) : error C2501: 'CHAR' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(171) : error C2501: 'szDeviceName' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(193) : error C2146: syntax error : missing ';' before identifier 'dwSize'
c:\program files\microsoft visual studio\vc98\include\ras.h(193) : error C2501: 'DWORD' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(193) : error C2501: 'dwSize' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(194) : error C2146: syntax error : missing ';' before identifier 'szEntryName'
c:\program files\microsoft visual studio\vc98\include\ras.h(194) : error C2501: 'WCHAR' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(194) : error C2501: 'szEntryName' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(195) : error C2146: syntax error : missing ';' before identifier 'szPhoneNumber'
c:\program files\microsoft visual studio\vc98\include\ras.h(195) : error C2501: 'WCHAR' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(195) : error C2501: 'szPhoneNumber' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(196) : error C2146: syntax error : missing ';' before identifier 'szCallbackNumber'
c:\program files\microsoft visual studio\vc98\include\ras.h(196) : error C2501: 'WCHAR' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(196) : error C2501: 'szCallbackNumber' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(197) : error C2146: syntax error : missing ';' before identifier 'szUserName'
c:\program files\microsoft visual studio\vc98\include\ras.h(197) : error C2501: 'WCHAR' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(197) : error C2501: 'szUserName' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(198) : error C2146: syntax error : missing ';' before identifier 'szPassword'
c:\program files\microsoft visual studio\vc98\include\ras.h(198) : error C2501: 'WCHAR' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(198) : error C2501: 'szPassword' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(199) : error C2146: syntax error : missing ';' before identifier 'szDomain'
c:\program files\microsoft visual studio\vc98\include\ras.h(199) : error C2501: 'WCHAR' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(199) : error C2501: 'szDomain' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(209) : error C2146: syntax error : missing ';' before identifier 'dwSize'
c:\program files\microsoft visual studio\vc98\include\ras.h(209) : error C2501: 'DWORD' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(209) : error C2501: 'dwSize' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(210) : error C2146: syntax error : missing ';' before identifier 'szEntryName'
c:\program files\microsoft visual studio\vc98\include\ras.h(210) : error C2501: 'CHAR' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(210) : error C2501: 'szEntryName' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(211) : error C2146: syntax error : missing ';' before identifier 'szPhoneNumber'
c:\program files\microsoft visual studio\vc98\include\ras.h(211) : error C2501: 'CHAR' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(211) : error C2501: 'szPhoneNumber' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(212) : error C2146: syntax error : missing ';' before identifier 'szCallbackNumber'
c:\program files\microsoft visual studio\vc98\include\ras.h(212) : error C2501: 'CHAR' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(212) : error C2501: 'szCallbackNumber' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(213) : error C2146: syntax error : missing ';' before identifier 'szUserName'
c:\program files\microsoft visual studio\vc98\include\ras.h(213) : error C2501: 'CHAR' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(213) : error C2501: 'szUserName' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(214) : error C2146: syntax error : missing ';' before identifier 'szPassword'
c:\program files\microsoft visual studio\vc98\include\ras.h(214) : error C2501: 'CHAR' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(214) : error C2501: 'szPassword' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(215) : error C2146: syntax error : missing ';' before identifier 'szDomain'
c:\program files\microsoft visual studio\vc98\include\ras.h(215) : error C2501: 'CHAR' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(215) : error C2501: 'szDomain' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(238) : error C2146: syntax error : missing ';' before identifier 'dwSize'
c:\program files\microsoft visual studio\vc98\include\ras.h(238) : error C2501: 'DWORD' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(238) : error C2501: 'dwSize' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(239) : error C2146: syntax error : missing ';' before identifier 'dwfOptions'
c:\program files\microsoft visual studio\vc98\include\ras.h(239) : error C2501: 'DWORD' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(239) : error C2501: 'dwfOptions' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(240) : error C2146: syntax error : missing ';' before identifier 'hwndParent'
c:\program files\microsoft visual studio\vc98\include\ras.h(240) : error C2501: 'HWND' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(240) : error C2501: 'hwndParent' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(241) : error C2146: syntax error : missing ';' before identifier 'reserved'
c:\program files\microsoft visual studio\vc98\include\ras.h(241) : error C2501: 'DWORD' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(241) : error C2501: 'reserved' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(270) : error C2146: syntax error : missing ';' before identifier 'dwSize'
c:\program files\microsoft visual studio\vc98\include\ras.h(270) : error C2501: 'DWORD' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(270) : error C2501: 'dwSize' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\ras.h(270) : fatal error C1003: error count exceeds 100; stopping compilation
Error executing cl.exe.
|
This make it look like there is a problem with ras.h, I also tried compiling this in LCC W32 and it highlighted things in ras.h, and both MSVC++ and LCC W32 use different ras.h files...
Please help...