3. Object Store, Directory, and Network Operations

< BACK  NEXT >
[oR]

Chapter 3. Object Store, Directory, and Network Operations

Windows CE uses the Object Store for storing files, databases, and the registry (see Chapter 4). The Object Store uses RAM. This is limited to 256 MB in Windows CE 3.0, and 16 MB in earlier versions. Other devices can be used to store files and database, including storage cards (such as Compact Flash memory cards) and disk drives. Windows CE can also connect to resources on the network, either through a dialup/serial communications Remote Access Services (RAS) connection or a network device such as a NE2000 PCMCIA network card.

Unlike Windows NT/98/2000, Windows CE does not use drive letters (for example, "F:") for network connections or devices. Directories in the Object Store (for example, "\Storage Card") represent storage devices. Network connections can be accessed directly through UNCs (Universal Naming Conventions) such as "\\myserver\myshare\myfile.txt". Alternatively, a connection can be made using the remote name (the UNC) and a local name. The local name is added to the directory "\network", which can then be used to access the network. So, for example, if a connection is made using the local name "myresource", and the network resource contains the file "myfile.txt", the file can be accessed through the name "\network\myresource\myfile.txt". Windows CE does not support the concept of "current directory," so functions like GetCurrentDirectory are not implemented.

The object store is maintained in RAM, and so needs to be reliable in the event of system crashes and invalid memory pointers from devices and applications. The object store uses transactions to ensure that the contents of the store can be returned to a known, integral state when a device is restarted. Files and directories are just two kinds of objects that can be stored. Registry items and property database records are also objects. Each object (including files and directories) has a unique identifier called an "Object ID," or OID. While you can find the OID for a file or directory, it is not particularly useful. However, the OIDs are essential when dealing with property databases.

Windows CE gives you several functions that you can use to access information about the object store, individual directories (folders), and network resources. For example, you use these functions:

  • To find the maximum size and free space in the Object Store and storage devices

  • To create and remove directories

  • To find files in directories

Windows CE contains a set of WNet functions that lets you find and connect to network drives and printers shared by other machines. With these functions you can:

  • Enumerate all the domains on the network

  • Enumerate all the machines in each domain

  • Enumerate all the drives and printers on each machine

  • Connect to any drive on the network

  • Disconnect from any drive

All the connection options seen by a user in the Explorer are implemented using the WNet and related functions.


< BACK  NEXT >


Windows CE 3. 0 Application Programming
Windows CE 3.0: Application Programming (Prentice Hall Series on Microsoft Technologies)
ISBN: 0130255920
EAN: 2147483647
Year: 2002
Pages: 181

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net