⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 windbase.h

📁 此程序为EVC编写的MIS系统
💻 H
📖 第 1 页 / 共 2 页
字号:
//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft end-user
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
// If you did not accept the terms of the EULA, you are not authorized to use
// this source code. For a copy of the EULA, please see the LICENSE.RTF on your
// install media.
//
/**


 Module: windbase.h

 Purpose: Master include file for WINCE Database APIs

**/

// @doc OBJSTORE
/*
@topic Windows CE Object Store |
    The Windows CE object store has 3 parts - a registry API, a file system API and a database API. 
    <nl>The standard Win32 API's supported by the registry are:
    <nl>RegCloseKey 
    <nl>RegCreateKeyEx
    <nl>RegDeleteKey
    <nl>RegDeleteValue
    <nl>RegEnumValue
    <nl>RegEnumKeyEx
    <nl>RegOpenKeyEx
    <nl>RegQueryInfoKey
    <nl>RegQueryValueEx
    <nl>RegSetValueEx

    The standard Win32 API's supported by the filesytem are:
    <nl>CreateDirectory
    <nl>RemoveDirectory
    <nl>MoveFile
    <nl>CopyFile
    <nl>DeleteFile
    <nl>GetFileAttributes
    <nl>FindFirstFile
    <nl>CreateFileW
    <nl>ReadFile
    <nl>WriteFile
    <nl>GetFileSize
    <nl>SetFilePointer
    <nl>GetFileInformationByHandle
    <nl>FlushFileBuffers
    <nl>GetFileTime
    <nl>SetFileTime
    <nl>SetEndOfFile
    <nl>FindClose
    <nl>FindNextFile

    In addition, the following additional filesystem call is available:
    <nl>CreateContainer

    The various functions and data structures are described in this
    document.
*/

#ifndef __WINDBASE__
#define __WINDBASE__

// @CESYSGEN IF CE_MODULES_FILESYS

/*
@type CEOID | Unique identifier for all WINCE objects
@comm Every WINCE object can be efficiently referred to by its OID. OID's are unique
      in the system and are not reused 
*/
typedef DWORD CEOID;
typedef CEOID *PCEOID;

typedef struct  _CEGUID {
    DWORD Data1;
    DWORD Data2;
    DWORD Data3;
    DWORD Data4;
} CEGUID, *PCEGUID;


#ifndef WM_DBNOTIFICATION
#define WM_DBNOTIFICATION 0x03FD
#else
ERRFALSE(WM_DBNOTIFICATION == 0x03FD);
#endif

#define CEDB_EXNOTIFICATION	0x00000001
typedef struct _CENOTIFYREQUEST {
    DWORD dwSize;   // must be set to the structure size
    HWND  hwnd;     // window handle for notifications to be posted
    DWORD dwFlags;
    HANDLE hHeap;   // heap from which to allocate EX-NOTIFICATIONS
    DWORD  dwParam;
} CENOTIFYREQUEST, *PCENOTIFYREQUEST;


typedef struct _CENOTIFICATION {
    DWORD dwSize;
    DWORD dwParam;
    UINT  uType;
    CEGUID guid;
    CEOID  oid;
    CEOID  oidParent;
} CENOTIFICATION, *PCENOTIFICATION;

// @CESYSGEN IF FILESYS_FSMAIN

// @struct CEFILEINFO | Contains information about a file object    
typedef struct _CEFILEINFO {
    DWORD    dwAttributes;         //@field File attributes
    CEOID    oidParent;            //@field CEOID of parent directory
    WCHAR    szFileName[MAX_PATH]; //@field Full path name of the file
    FILETIME ftLastChanged;        //@field Time stamp of last change
    DWORD    dwLength;             //@field Length of file
} CEFILEINFO, *PCEFILEINFO;

//@struct CEDIRINFO | Contains information about a directory object    
typedef struct _CEDIRINFO {
    DWORD dwAttributes;        //@field Directory attributes
    CEOID oidParent;           //@field CEOID of parent directory
    WCHAR szDirName[MAX_PATH]; //@field Full path name of the directory
} CEDIRINFO, *PCEDIRINFO;

/*
@msg DB_CEOID_CREATED | Msg sent on creation of new oid
@comm WParam == CEOID modified
      LParam == CEOID's parent CEOID
@xref <f CeRegisterReplNotification>      
*/
#define DB_CEOID_CREATED            (WM_USER + 0x1)
/*
@msg DB_CEOID_DATABASE_DELETED | Msg sent on deletion of database
@comm WParam == CEOID modified
      LParam == CEOID's parent CEOID
@xref <f CeRegisterReplNotification>      
*/
#define DB_CEOID_DATABASE_DELETED   (WM_USER + 0x2)
/*
@msg DB_CEOID_RECORD_DELETED | Msg sent on deletion of record
@comm WParam == CEOID modified
      LParam == CEOID's parent CEOID
@xref <f CeRegisterReplNotification>      
*/
#define DB_CEOID_RECORD_DELETED     (WM_USER + 0x3)
/*
@msg DB_CEOID_FILE_DELETED | Msg sent on deletion of file
@comm WParam == CEOID modified
      LParam == CEOID's parent CEOID
@xref <f CeRegisterReplNotification>      
*/
#define DB_CEOID_FILE_DELETED       (WM_USER + 0x4)
/*
@msg DB_CEOID_DIRECTORY_DELETED | Msg sent on deletion of directory
@comm WParam == CEOID modified
      LParam == CEOID's parent CEOID
@xref <f CeRegisterReplNotification>      
*/
#define DB_CEOID_DIRECTORY_DELETED  (WM_USER + 0x5)
/*
@msg DB_CEOID_CHANGED | Msg sent on item modification
@comm WParam == CEOID modified
      LParam == CEOID's parent CEOID
@xref <f CeRegisterReplNotification>      
*/
#define DB_CEOID_CHANGED            (WM_USER + 0x6)

// flags for CeGetReplChangeMask
#define REPL_CHANGE_WILLCLEAR   0x00000001

typedef struct STORE_INFORMATION {
    DWORD dwStoreSize;
    DWORD dwFreeSize;
} STORE_INFORMATION, *LPSTORE_INFORMATION;

BOOL GetStoreInformation (LPSTORE_INFORMATION lpsi);

// @CESYSGEN ENDIF

// @CESYSGEN IF FILESYS_FSDBASE

/*
@type CEPROPID | PropID's for WINCE properties
@comm PropID's on the WINCE match PropID's used by Mapi1. The top 2 bytes are an ID
     and the low 2 bytes are the type. For a list of supported types look at the tags
     supported in <t CEVALUNION>. We reserve one bit (0x4000) in the type as the 
     flag <b CEPROPVAL_NULL> as a special flag. It denotes that a property was not 
     found in a Read call, or that the property should be deleted in a write call.
*/
typedef DWORD CEPROPID;
typedef CEPROPID *PCEPROPID;
#define TypeFromPropID(propid) LOWORD(propid)

//@struct CERECORDINFO | Contains information about a record object    
typedef struct _CERECORDINFO {
    CEOID  oidParent;          //@field CEOID of parent database
} CERECORDINFO, *PCERECORDINFO;

#define CEDB_SORT_DESCENDING        0x00000001
#define CEDB_SORT_CASEINSENSITIVE   0x00000002
#define CEDB_SORT_UNKNOWNFIRST      0x00000004
#define CEDB_SORT_GENERICORDER      0x00000008  // internally used for generic ordering
#define CEDB_SORT_IGNORENONSPACE    0x00000010
#define CEDB_SORT_IGNORESYMBOLS     0x00000020
#define CEDB_SORT_IGNOREKANATYPE    0x00000040
#define CEDB_SORT_IGNOREWIDTH       0x00000080
#define CEDB_SORT_STRINGSORT        0x00000100
#define CEDB_SORT_UNIQUE            0x00000200
#define CEDB_SORT_NONNULL           0x00000400
// High nibble of flags reserved
//@struct SORTORDERSPEC | Specifies details about a sort order in a database
//@comm Note that we only support simple sorts on a primary key. Records with the same key value
//      will be sorted in arbitrary order.
typedef struct _SORTORDERSPEC {
    CEPROPID  propid;   //@field PropID to be sorted on.
    DWORD     dwFlags;  //@field Any combination of the following
                        //@flag CEDB_SORT_DESCENDING | Sort in descending order. Default is ascending.
                        //@flag CEDB_SORT_CASEINSENSITIVE | Only valid for strings.
                        //@flag CEDB_SORT_UNKNOWNFIRST | Puts records which do 
                        // not contain this property before all the other records.
                        // Default is to put them last.
                        //@flag CEDB_SORT_IGNORENONSPACE | Only valid for strings.
                        // This flag only has an effect for the locales in which 
                        // accented characters are sorted in a second pass from
                        // main characters.
                        //@flag CEDB_SORT_IGNORESYMBOLS | Only valid for strings.
                        //@flag CEDB_SORT_IGNOREKANATYPE | Only valid for strings.
                        // Do not differentiate between Hiragana and Katakana characters.
                        //@flag CEDB_SORT_IGNOREWIDTH | Only valid for strings.
                        // Do not differentiate between a single-byte character 
                        // and the same character as a double-byte character.
                        //@flag CEDB_SORT_UNIQUE | Require the property to be
                        // unique across all records in the database.
                        //@flag CEDB_SORT_NONNULL | Require the property to be
                        // present in all records.
} SORTORDERSPEC, *PSORTORDERSPEC;

#define CEDB_MAXSORTPROP 3

#define SORTORDERSPECEX_VERSION 1
//@struct SORTORDERSPECEX | Specifies details about a sort order in a database
//@comm Supports a hierarchy of sorts.
typedef struct _SORTORDERSPECEX {
    WORD      wVersion;    //@field Version of this structure.
    WORD      wNumProps;   //@field Number of properties in this sort order.
                           // Must not be more than CEDB_MAXSORTPROP.
    WORD      wKeyFlags;   //@field Flags that correspond to the sort key.
                           // Any combination of the following:
                           //@flag CEDB_SORT_UNIQUE | Require the key to be
                           // unique across all records in the database.
    WORD      wReserved;   //Padding for DWORD alignment
    CEPROPID  rgPropID[CEDB_MAXSORTPROP]; //@field Array of PropIDs to be sorted
                           // on, in order of importance.
    DWORD     rgdwFlags[CEDB_MAXSORTPROP]; //@field Flags that correspond to the sort PropIDs
                           // Any combination of the following:
                           //@flag CEDB_SORT_DESCENDING | Sort in descending order. Default is ascending
                           //@flag CEDB_SORT_CASEINSENSITIVE | Only valid for strings.
                           //@flag CEDB_SORT_UNKNOWNFIRST | Puts records which do 
                           // not contain this property before all the other records.
                           // Default is to put them last.
                           //@flag CEDB_SORT_IGNORENONSPACE | Only valid for strings.
                           // This flag only has an effect for the locales in which 
                           // accented characters are sorted in a second pass from
                           // main characters.
                           //@flag CEDB_SORT_IGNORESYMBOLS | Only valid for strings.
                           //@flag CEDB_SORT_IGNOREKANATYPE | Only valid for strings.
                           // Do not differentiate between Hiragana and Katakana characters.
                           //@flag CEDB_SORT_IGNOREWIDTH | Only valid for strings.
                           // Do not differentiate between a single-byte character 
                           // and the same character as a double-byte character.
                           //@flag CEDB_SORT_NONNULL | Require the property to be
                           // present in all records.
} SORTORDERSPECEX, *PSORTORDERSPECEX;

// NOTENOTE someday this should become a separate CE-only error code
#define ERROR_DBPROP_NOT_FOUND  ERROR_ACCESS_DENIED
#define ERROR_REPEATED_KEY      ERROR_ALREADY_EXISTS

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -