Share via


Windows Networking API/Redirector Application Development

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

A Windows Embedded CE–based application can use Windows networking functions to establish and terminate network connections and to access files on servers supporting the Common Internet File System (CIFS). Access to this data is made possible by way of the Windows Embedded CE networking API (WNet). WNet communicates through the CIFS, also called Server Message Block (SMB), redirector to the remote host. A CIFS redirector enables one computer to access files on another. An application can use WNet functions to manage network connections anywhere in the network hierarchy.

An application can also 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 has 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. Most of the standard Windows Embedded CE file APIs (such as CreateFile) work with UNC path names.

The Windows Embedded CE WNet API is similar to WNet for Windows-based desktop operating systems, with the following exceptions:

Windows Embedded CE-based devices do not support drive letters. The WNet API 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 Embedded 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 Embedded CE is the Microsoft Windows Network.

No connections are automatically 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, then calling WnetEnumResource on the returned handle.

Note

Windows Embedded CE does not expose APIs for mail slots. Windows Embedded CE supports only a subset of the full WNet API. 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 Microsoft Windows NT®, which returns WN_XXX error values. ERROR _XXX error values are mapped to the appropriate WN_XXX error codes for backward compatibility. LAN Manager functions are not exposed. Windows Embedded CE does not support the concept of a computer or device belonging to a specific network context.

In This Section

  • Accessing Remote File Systems
    Provides information about the CIFS redirector that is used for accessing remote file systems and remote printers.
  • Managing Network Connections with WNet
    Provides information about typical tasks performed by the WNet API such as connecting to network, retrieving network data, and printing on a network.

See Also

Other Resources