Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Latest commit

 

History

History

IoTCoreService

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
page_type urlFragment languages products description
sample
iotcore-service
cpp
windows
windows-iot
A simple shared host service for Windows 10 IoT Core.

Windows 10 IoT Core Service Sample

This sample creates a simple shared host service for Windows 10 IoT Core.

Usage

  1. Download this sample from here.
  2. Open IotCoreService.sln, select the appropriate platform and build the project. The path containing IotCoreService.dll will be displayed in your Visual Studio Output view. It will look something like this: IotCoreService.vcxproj -> D:\samples-develop\IotCoreService\ARM\Debug\IotCoreService.dll.
  3. Copy IotCoreService.dll to your device. You can connect and make modifications to your device when it is running by opening Windows Explorer and entering \\C$\Windows\System32.
  4. To configure your service, copy ConfigureIotCoreService.bat to your device, connect to your device using SSH or Powershell, and run ConfigureIotCoreService.bat. This will update the registry to enable IotCoreService on boot.
  5. Restart your device.
  6. Query your service by running sc query IotCoreService. Given the configuration we've set up, you should see output like this:
    SERVICE_NAME: iotcoreservice
            TYPE               : 20  WIN32_SHARE_PROCESS
            STATE              : 2  START_PENDING
                                    (NOT_STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
            WIN32_EXIT_CODE    : 0  (0x0)
            SERVICE_EXIT_CODE  : 0  (0x0)
            CHECKPOINT         : 0x0
            WAIT_HINT          : 0x7d0
  1. At this point, ServiceMain has been called. There is no functionality presently in ServiceMain, but you can consult the MSDN documentation to add functionality as desired!
  2. To stop your service, run ConfigureIotCoreService.bat remove to remove the service configuration and restart your device.