Поделиться через


File Server Application Development (Windows Embedded CE 6.0)

1/6/2010

The File Server technology enables clients to access files and other resources, such as printers, from a server over a network using TCP/IP.

File Server uses the Common Internet File System (CIFS). This is an extension of the Server Message Block (SMB) file sharing protocol. CIFS enables a network-enabled application to access and manipulate files and directories on a remote server in the same way that it the application accesses and manipulates files and directories on the local system.

File Server supports user-level authentication. This means that any client attempting to access a share on a server must provide a user name and password. When authenticated, the user can then access all shares that are not protected by share-level security on a server.

Windows Embedded CE provides a set of functions that enable you to programmatically manage the shares on your file server, as well as the share and user permissions. For more information, see File Server Reference.

Windows Embedded CE provides a Web-based network configuration utility to configure your server, and manage both share and user permissions. This sample configuration utility is located in the %_WINCEROOT%\Public\Servers\oak\Samples\remoteadmin\modules\smb directory. To access the Web-based configuration page for your server, type the following information in the address bar in your Internet browser:

Http://<IP address of your server device>/remoteadmin

You can also modify these settings using the registry. For more information, see File Server Registry Settings.

Note

You can create users programmatically by calling the NTLMSetUserInfo function. Windows Embedded CE also exposes the NTLMDeleteUser function, which is used to delete a user name from the local database, and the NTLMEnumUser function, which is used to enumerate a user in a local database.

File Server uses the IOCTL_SERVICE_REFRESH I/O control (IOCTL) and device.exe to reload these settings if they are changed without rebooting the device.

To reload your server settings

  1. Call the CreateFile function to open a handle to the "SMB1" service.

  2. To send the IOCTL, call DeviceIoControl on the open service. DeviceIoControl then calls the service-related xxx_IOControl (Services.exe) function, and passes in IOCTL_SERVICE_REFRESH as the dwCode parameter.

See Also

Reference

xxx_IOControl (Services.exe)

Concepts

Controlling a Running Service
File Server Registry Settings

Other Resources

File Server
CreateFile
DeviceIoControl