Setting up RAS server on CE.NET

From: Glenn (richmogd_at_hotmail.com)
Date: 03/29/04


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);
  }



Relevant Pages

  • Setting up RAS server on CE.NET
    ... devices always returns zero and the dwSize parameter is always set to ... as is the dwNumberOfDevices parameter. ... DWORD dwTemp = 0; ...
    (microsoft.public.windowsce.embedded.vc)
  • overlapped file I/o and ERROR_NO_SYSTEM_RESOURCES help?
    ... DWORD dwDesiredAccess = 0; ... DWORD dwFileSize = GetFileSize; ... DWORD dwOffset = 0; ... ReadFile(hFile, lpBuf, dwSize, NULL, &overlapped); ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Warten auf Prozessbeendigung
    ... DWORD cntUsage; ... Du musst demnach dwSize auf 296 setzen, ... Process32First() übergeben wird, ... Erich TODT dFPUG Regionalleiter Wien ...
    (microsoft.public.de.fox)