共用方式為


Core OS Reference

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

Core OS services give applications access to the resources of the computer and the features of the underlying OS, such as memory, file systems, devices, processes, and threads.

An application uses these services to manage and monitor the resources it needs to complete its work.

Applications can share code or information with other applications.

Networking functions read from and write to communication ports, as well as controlling the operating modes of these ports.

Applications handle special conditions while running. For example, they can handle errors, log events, and handle exceptions.

Applications can also use special functions to debug code and improve its performance. For example, the debugging functions permit single-step control of other processes, and the performance monitoring functions provide detailed information on running processes.

In This Section

  • CeLog Event Tracking Reference
    The event tracking subsystem is implemented as a library that can be loaded dynamically into the kernel.

    Although no specific kernel settings are required to use it, the profiling kernel provides more event tracking data than the kernel without profiling.

    Events that are omitted on the nonprofiling kernel are interrupts, kernel calls, and translation look-aside buffer (TLB) misses.

    To take advantage of all event tracking data provided by the kernel, use the CeLog functions, structures, global variables, zones, and event identifiers.

  • Debugging Reference
    Use the debugging functions and structures to create a basic, event-driven debugger.

    Event-driven means that the debugger is notified every time specific events occur in the process being debugged so that it can take appropriate action in response to the events.

  • DLL Reference
    Use the DLL functions and structures to perform operations such as the following:

    • Retrieving information about the specified module
    • Disabling notifications for the DLL
    • Mapping DLL files
  • Error Values
    Use the error functions to receive and display error information for your application.
  • Exception Reference
    Use exception functions and structures to create consistently more robust and more reliable applications.
  • Fiber Reference
    Use the fiber functions to perform operations such as scheduling a fiber, allocating a fiber object, and obtaining information about a fiber.

    A fiber is a unit of execution that must be manually scheduled by the application.

    Fibers run in the context of the threads that schedule them. Each thread can schedule multiple fibers.

    In general, fibers do not provide advantages over a well-designed multithreaded application. However, using fibers can make it easier to port applications that were designed to schedule their own threads.

  • Memory Management Reference
    Use the kernel memory management functions and structures to perform operations such as the following:

    • Allocating and de-allocating memory
    • Obtaining information about the heap or physical and virtual memory of the system
    • Changing memory properties

    The Windows Mobile kernel uses a paged virtual-memory system to manage and allocate program memory.

    Memory properties include the size of a specified local memory object or the access protection on a region of committed pages in the virtual address space.

  • Message Queue Point-to-Point Reference
    Use the message queue functions and structures to perform operations such as the following:

    • Opening and closing a message queue
    • Returning information about a message queue
    • Reading a message from a message queue or writing a message to a message queue

    The message queue must be designed to use as little memory as possible to be efficient.

    If there are many readers, each reader only reads the current message at the head of the queue when they make a read request.

    The CreateMsgQueue function enables the specification of a remote queue.

  • Network Address Translation Reference
    Use the Network Address Translation (NAT) functions and structures to facilitate communication between a NAT editor and an NAT driver.

    This allows any device running NAT to function as a gateway between the Internet and a LAN.

  • Process and Thread Reference
    Use the process and thread functions and structures to perform operations such as creating and terminating a process or thread and retrieving information about a process or thread.

    All applications based on Windows Mobile consist of a process and one or more threads:

    • A process is a single instance of a running application.
    • A thread is the basic unit that the Windows Mobile OS allocates processor time to. A thread can execute any part of the process code, including parts that are being executed by another thread.
  • Serial Communications Reference
    Use these functions and structures to do the following:

    • Open, close, and manipulate serial ports
    • Transmit and receive data
    • Manage the connection

    Windows Mobile supports standard Windows-based desktop functions for serial communications.

  • String Reference
    Use the strings functions to give applications the means to do the following:

    • Copy, compare, sort, format, and convert character strings
    • Determine the type of each character in a string

    All string functions support the single-byte, double-byte, and Unicode character sets if these character sets are supported by the OS the application is run on.

  • Synchronization Reference
    Use the synchronization functions to synchronize a thread's actions with those of another thread.

    Windows Mobile provides several synchronization objects such as the following:

    • Critical sections
    • Mutexes
    • Events
    • Semaphores
  • System Management Reference
    Use messages to notify applications of device changes and power changes.

    Device messages notify applications of device change events; power messages notify applications of power management events.

    Applications and drivers can also define and use custom messages to enable notification of other types of events.

  • Time Reference
    Use the time functions and structures to perform operations such as retrieving the date and time and setting the date and time.

    A real-time OS is one element of a complete real-time system, which is a set of all system elements (hardware, OS, and applications) needed to meet system requirements.

    A real-time application is an application designed to manage time-critical systems, such as the following:

    • Manufacturing process controls
    • High-speed data acquisition devices
    • Telecommunications switching equipment

    The unique characteristic of a real-time application is that it not only provides the correct response, but it also responds within a specified time frame.

  • ToolHelp Reference
    Use the ToolHelp functions and structures to perform operations such as the following:

    • Retrieving information about the first and next heap allocated by a process
    • Retrieving information about the first and next module associated with a process
    • Taking a snapshot of the heaps, modules, and threads used by processes

    The ToolHelp API is a set of debugger APIs for ToolHelp.

  • Unicode Reference
    Use the Unicode functions, structures, and structures to create character-based data that can be transferred to and used on any OS, including those that do not support Unicode.

See Also

Other Resources

Core OS Services