Click here to Skip to main content
15,892,517 members
Articles / Mobile Apps

The StateWizard VC++ Add-in and Engine with Source Code

Rate me:
Please Sign up or sign in to vote.
4.73/5 (24 votes)
26 Mar 2009CPOL12 min read 190.6K   2.8K   132  
A cross-platform state-oriented application framework and a ClassWizard-like round-trip UML dynamic modeling/development tool that runs in popular IDEs. Aims at providing concurrent, distributed, and real-time application development tools for Win32/Linux
/*++

Copyright (c) Microsoft Corporation. All rights reserved.

Module Name:

    ceutil.h

Abstract:

    Declaration and implementation of Service helper functions

    Contains all registry manipulation functions for the Windows CE Services.
    Note: The Windows CE Services path is always
        "Software\\Microsoft\\Windows CE Services"
    under HKCU or HKLM


Environment:

    WIN32

--*/
#ifndef _INC_CEREG_H
#define _INC_CEREG_H

#ifdef __cplusplus
extern "C" {            /* Assume C declarations for C++ */
#endif  /* __cplusplus */

typedef HKEY  HCESVC;
typedef PHKEY PHCESVC;
typedef DWORD DEVICEID;

#define DEVICE_GUEST    (DEVICEID)-1
#define DEVICE_INVALID  (DEVICEID)0

enum {
    CESVC_ROOT_COMMON=0,
    CESVC_ROOT_MACHINE = CESVC_ROOT_COMMON,
    CESVC_ROOT_USER,
    CESVC_DEVICES,
    CESVC_DEVICEX,
    CESVC_DEVICE,
    CESVC_DEVICE_SELECTED,
    CESVC_SERVICES,
    CESVC_SERVICES_USER = CESVC_SERVICES,
    CESVC_SERVICES_COMMON,
    CESVC_SYNC,
    CESVC_SYNC_COMMON,
    CESVC_FILTERS,
    CESVC_SPECIAL_DEFAULTS,
    CESVC_CUSTOM_MENUS,
    CESVC_SYNCX };

#define SVC_FLAG_GUEST            0x0001
#define SVC_FLAG_CURRENT_PROFILE  0x0002
#define SVC_FLAG_PROFILE          0x0004  // specify profile id
#define SVC_FLAG_ALL_PROFILES     0x0008  // all ids
#define SVC_FLAG_COMMON           0x0010  // shared crud
#define SVC_FLAG_ALL              0x001F

typedef struct {
    DWORD   cbSize;
    DWORD   Flags;
    DWORD   ProfileId;
    BOOL    Enabled;
} SVCINFO_GENERIC;

typedef struct {
    DWORD   cbSize;
    DWORD   Flags;
    DWORD   ProfileId;
    BOOL    Enabled;
    LPTSTR  DisplayName;        // sync app name
    LPTSTR  ProgId;
} SVCINFO_SYNC;

//
// Prototypes:
//

//
//  Obsolete APIs 
//
HRESULT __stdcall CeSvcAdd( LPTSTR pszSvcName, LPTSTR pszSvcClass, LPVOID pSvcInfo );
HRESULT __stdcall CeSvcRemove(LPTSTR pszSvcName, LPTSTR pszSvcClass, DWORD dwSvcFlags );
HRESULT __stdcall CeSvcQueryInfo( LPTSTR pszSvcName, LPTSTR pszSvcClass, LPVOID pSvcInfo, DWORD cbBuffer );
HRESULT __stdcall CeSvcDelete( HCESVC hSvc );
//
//  End of obsolete APIs
//


HRESULT __stdcall CeSvcOpen( UINT uSvc, LPTSTR pszPath, BOOL fCreate, PHCESVC phSvc );
HRESULT __stdcall CeSvcOpenEx( HCESVC hSvcRoot, LPTSTR pszPath, BOOL fCreate, PHCESVC phSvc );
HRESULT __stdcall CeSvcClose( HCESVC hSvc );

HRESULT __stdcall CeSvcGetString( HCESVC hSvc, LPCTSTR pszValName, LPTSTR pszVal, DWORD cbVal );
HRESULT __stdcall CeSvcSetString( HCESVC hSvc, LPCTSTR pszValName, LPCTSTR pszVal );
HRESULT __stdcall CeSvcGetDword( HCESVC hSvc, LPCTSTR pszValName, LPDWORD pdwVal );
HRESULT __stdcall CeSvcSetDword( HCESVC hSvc, LPCTSTR pszValName, DWORD dwVal );
HRESULT __stdcall CeSvcGetBinary( HCESVC hSvc, LPCTSTR pszValName, LPBYTE pszVal, LPDWORD pcbVal );
HRESULT __stdcall CeSvcSetBinary( HCESVC hSvc, LPCTSTR pszValName, LPBYTE pszVal, DWORD cbVal );
HRESULT __stdcall CeSvcDeleteVal( HCESVC hSvc, LPCTSTR pszValName );

DEVICEID __stdcall CeGetDeviceId( void );
DEVICEID __stdcall CeGetSelectedDeviceId( void );

HRESULT __stdcall CeSvcEnumProfiles(PHCESVC phSvc, DWORD lProfileIndex, PDWORD plProfile);

#ifdef __cplusplus
}       /* End of extern "C" { */
#endif /* __cplusplus */

#endif  // _INC_CEREG_H

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
United States United States
Alex "Question is more important than the answer."

Comments and Discussions