Setting up RAS server on CE.NET
From: Glenn (richmogd_at_hotmail.com)
Date: 03/29/04
- Next message: Andrew: "GWES exception at startup"
- Previous message: Robert Magyar: "RE: Howto license many binary images"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 30 Mar 2004 11:57:58 +1200
Hi everyone,
I've searched the newsgroups and this appears to be a common problem,
but I'm trying to set up a RAS server on my platform. My registry
entries are:
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\HD64404UART0]
"DeviceArrayIndex"=dword:0 ; HD64404 UART0 is driver object array
index 0
"Prefix"="SER"
"Dll"="Hd64404Ser.dll"
"Order"=dword:0
"Index"=dword:1 ; SER1: device
; not available to TAPI - internal UART dedicated to MSP430 PSU
Board link...
;"Tsp"="Unimodem.dll"
;"DeviceType"=dword:0
;"FriendlyName"="Internal MSP430 link on SER1:"
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\HD64404UART3]
"DeviceArrayIndex"=dword:1 ; HD64404 UART3 is driver object array
index 1
"Prefix"="SER"
"Dll"="Hd64404Ser.dll"
"Order"=dword:0
"Index"=dword:2 ; SER2: device
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\HD64404UART3\Unimodem]
"Tsp"="Unimodem.dll"
"DeviceType"=dword:0
"FriendlyName"="Serial Cable on SER2:"
"DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00,
00,4B,00,00, 00,00, 08, 00, 00, 00,00,00,00
I've then tried to enumerate the devices with the code below. RASEnum
devices always returns zero and the dwSize parameter is always set to
zero when the function returns, as is the dwNumberOfDevices parameter.
Can anyone suggest anything for this one?
RASDEVINFO di[32];
RASCNTL_SERVERLINE sl;
DWORD dwTemp = 0;
DWORD dwRtn = 0;
DWORD dwNumberOfDevices = 0;
DWORD dwSize = sizeof(di);
int ii=0;
dwRtn = RasIOControl(NULL, RASCNTL_SERVER_ENABLE, NULL, 0, NULL, 0,
&dwTemp);
if( dwRtn != 0 )
{
printf("\tFailed with error #%d enabling server.\r\n", dwRtn);
}
sl.rasDevInfo.dwSize = sizeof(RASDEVINFO);
wcscpy(sl.rasDevInfo.szDeviceName, L"HD64404UART3");
wcscpy(sl.rasDevInfo.szDeviceType, L"direct");
sl.bEnable = TRUE;
sl.bmFlags = 0;
sl.DisconnectIdleSeconds = 120;
sl.dwDevConfigSize = 0;
dwRtn = RasIOControl(NULL, RASCNTL_SERVER_LINE_ADD, (LPBYTE) &sl,
sizeof(sl), NULL, 0, &dwTemp);
if( dwRtn != 0 )
{
printf("\tFailed with error #%d adding line.\r\n", dwRtn);
}
dwSize = sizeof(di);
di[0].dwSize = sizeof(RASDEVINFO);
dwRtn = RasEnumDevices(di, &dwSize, &dwNumberOfDevices);
if( dwRtn != 0 )
{
printf("\tEnumeration failed with error #%d.\r\n", dwRtn);
}
printf("Devices = %d\r\n", dwNumberOfDevices);
for(ii=0;ii<dwNumberOfDevices;ii++)
{
printf("\t%s\r\n", di[ii].szDeviceName);
}
- Next message: Andrew: "GWES exception at startup"
- Previous message: Robert Magyar: "RE: Howto license many binary images"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|