Windows Networking
A Windows CE–based application can use Windows networking functions to establish and terminate network connections and to retrieve current configuration data for the Microsoft Network. Access to this data is made possible by way of the Windows CE networking API (WNet). WNet communicates through the Common Internet File System (CIFS) redirector to the remote host. A CIFS redirector is a module through which one computer can access another. An application can use WNet functions to manage network connections anywhere in the network hierarchy.
An application can access network resources using the Universal Naming Convention (UNC). UNC is a system for naming files on a network so that a file on a computer have the same path when accessed from any other computer. For example \\Servername\Sharename\Filename.ext; Servername is the server name, and Sharename is a directory on Servername that contains the file Filename.ext.
The Windows CE WNet API is similar to WNet for Windows-based desktop platforms with the following exceptions:
- Windows CE does not support drive letters. WNet supports mapping a remote UNC name to a local name, but whereas for the desktop operating systems the local name is drive-based, for example, H:<path>, Windows CE local names may take any form, for example, Myshare\Path. Local names can be up to 64 characters in length, thus expanding the number of mapped network resources beyond 26.
- The only network provider currently supported by Windows CE is the Microsoft Windows Network.
- No connections are restored when the device is warm booted. A persistent connection is stored in the registry and the connection appears in the list of resources. This data is enumerated and retrieved by calling the WNetOpenEnum function with the dwScope parameter set to RESOURCE_REMEMBERED.
- Windows CE does not expose APIs for a Mail slots or named pipes.
- Only a subset of the full WNet API set is supported by Windows CE. For example, the WNet function WNetGetLastError is not supported. This function is redundant because supported WNet functions do not return extended error data. The user can use the GetLastError function. All WNet functions return an ERROR_xxx value. This is not the same as Windows NT, which returns WN_xxx error values. ERROR _xxx error values are mapped to the appropriate WN_xxx error codes for backward compatability.
- LaN Manager functions are not exposed.
- Windows CE does not support the concept of a computer or device belonging to a specific network context.