Initializing and Setting Up WinCE Framework

Requests to mobile platform server are exchanged using the HHive main class. When a class instance is created, initialization project parameters are specified.

To execute requests to server API, use the HHive(HyperHiveState) constructor:

public HHive(HyperHiveState hhState)

Arguments:

The HHive class contains the IsAuthorized property that returns status of connection with mobile platform server.

public bool IsAuthorized

Property value:

For details about WinCE framework methods see the Calling WinCE Framework Methods, Describing WinCE Framework Methods sections.

Example

Initialization of HyperHive in the Program class:

using System;
using HyperHive;
using HyperHive.Models;
namespace SmartDeviceProject
{
    static class Program
    {
        // static property to get HyperHive
        public static HHive HyperHive { get; private set;
    }
        /// <summary>
        /// The main entry point for the application
        /// </summary>
        [MTAThread]
        static void Main()
        {
            // Set parameters to work with HyperHive
            var hhState = new HyperHiveState
                          {
                              Host = "test.sp.fsight.com",
                              Environment = "test",
                              Project = "project",
                              Application = "app"
                          };            
            // Create an object of the HHive class based on specified parameters
            HyperHive = new HHive(hhState);
        }
    }
}

For details about WinCE framework methods see the Describing WinCE Framework Methods, Calling WinCE Framework Methods sections.

To view examples of WinCE framework use, see the Examples of WinCE Framework Use section.

See also:

WinCE Framework | Calling WinCE Framework Methods | Describing WinCE Framework Methods | Examples of WinCE Framework Use