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

📄 smsapi.h

📁 希望我上传的这些东西可以对搞编程的程序员有点小小的帮助!谢谢!
💻 H
📖 第 1 页 / 共 5 页
字号:
//      SMS_STATUS                      Status. Either SMS_OK or an error code.
//                                      LIST POSSIBLE ERROR CODES HERE.
//
//===========================================================================
//
//  SmsCommitFilter
//
//  This API will attempt to make the specified filter persistent. The filter
//  must be of a type that supports persistence, and all manadatory scalars
//  for the filter must have been set.
//
//  Parameters:
//      HANDLE hFilter
//      HANDLE hFContainer
//
//  Returns:
//      SMS_STATUS                      Status. Either SMS_OK or an error code.
//                                      LIST POSSIBLE ERROR CODES HERE.
//
//===========================================================================
//
//===========================================================================
//  7.  Filter APIs.
//===========================================================================
//
//  SmsCreateFilter
//
//  This API creates a filter of the specified type, initially empty. The
//  caller must then set tokens in this filter.
//  Filter types are listed above.
//
//  Parameters:
//      DWORD fType                     Type of filter to create.
//      HANDLE hConnection              Filters are associated with a
//                                      connection.
//      HANDLE *phFilter                Receives a handle to the filter.
//  Returns:
//      SMS_STATUS                      Status. Either SMS_OK or one of the
//                                      error codes listed above.
//
//============================================================================
//
//  SmsCloseFilter
//
//  Close the specified filter and deallocate any memory asociated with it.
//  Once a filter has been applied to a container (SetFilter), the user is
//  free to close it. The API system has made it own copy which will be freed
//  when no longer necessary.
//
//  Parameters:
//      HANDLE hFilter                  The filter to close.
//
//  Returns:
//      SMS_STATUS                      Status. Either SMS_OK or one of the
//                                      error codes listed above.
//
//============================================================================
//
//  SmsGetFilterType
//
//  This API gets the type for a particular filter. Using this type it is
//  possible to get the filter template.
//  Parameters:
//      HANDLE hFilter                  The filter to retrieve the type for.
//      DWORD *pfilterType              The filter type is returned here.
//      char *pszTag                    The filter tag is returned here.
//
//  Returns:
//      SMS_STATUS                      Status. Either SMS_OK or one of the
//                                      error codes listed above.
//
//===========================================================================
//
//  SmsGetToken
//
//  This API retrieves a token from the specified filter or folder. The token
//  to retrieve is given by the index parameter. See also SmsGetTokenCount.
//  The TOKEN structure is detailed in the file objectty.h.
//
//  Parameters:
//      HANDLE hObject                  Handle to filter or folder.
//      INT iIndex
//      TOKEN *pTokenInfo
//
//  Returns:
//      SMS_STATUS                      Status. Either SMS_OK or one of the
//                                      error codes listed above.
//
//===========================================================================
//
//  SmsAddToken
//
//  This API allows the caller to add a token into a filter (or folder). The
//  ANDOR parameter specifies if the token is to be ANDed or ORed with the
//  preceeding token. The index specifies whereabout in the filter expression
//  the token is to be inserted. The rules are as follows:
//  1. index is AT_START (-1), the token will be inserted at the start of the
//     expression and the ANDOR operator will be postfixed.
//  2. index is AT_END (-2), the token will be appended to the end of the
//     expression, the ANDOR operator will prefix the token.
//  3. if index is anything else, if the expression is currently empty then
//     the token will be inserted at the start of the expression, and the
//     ANDOR operator is ignored. If the expression is not empty then the
//     token will be inserted at the given index and the operator prefixed.
//     The exception here is if the index is out of range, in this case the
//     token will be appended with the ANDOR being prefixed.
//     In all cases, if inserting the token would cause the resulting
//     expression to be illegal a status of SMS_RANGE_ERROR will be returned.
//
//  Parameters:
//      HANDLE hObject                  Handle to filter or folder.
//      ANDOR opAndOr
//      TOKEN *pTokenInfo
//      INT iIndex
//
//  Returns:
//      SMS_STATUS                      Status. Either SMS_OK or one of the
//                                      error codes listed above.
//
//===========================================================================
//
//  SmsGetTokenCount
//
//  This API will return (in *pctTokens) the number of tokens currently in
//  the filter or folder expression.
//
//  Parameters:
//      HANDLE hObject                  Handle to either filter or folder.
//      DWORD *pctTokens
//
//  Returns:
//      SMS_STATUS                      SMS_OK, or SMS_INVALID_HANDLE.
//
//===========================================================================
//
//  SmsManipulateTokens
//
//  This APIs allows for the manipulation of tokens within a filter or folder
//  expression in various ways, according to the flags parameter.
//  TOK_GROUP       The tokens between the specified indicies are grouped
//                  together to form a sub-expression, ie they are backeted by
//                  parentheses.
//  TOK_UNGROUP     The tokens between the specified indicies have their
//                  parenthesis removed. This undoes the action of TOK_GROUP.
//  TOK_DELETE      The tokens within the specified indecies are deleted.
//                  In this case the tokens must not form a legal sub-
//                  expression.
//  TOK_GROUP_NOT   This is applicable only to persistent filters. At the
//                  moment that means only machine filters.
//                  This flag is applied to a range of one or more tokens that
//                  form a legal sub-expression. That is, a range of tokens
//                  that can ge grouped. The action performed by this is to
//                  group these tokens and preceed them with a 'NOT IN'
//                  token. This has the effect of specifying exclusion.
//
//  The user may use the manifests AT_START and AT_END to indicate
//  the full range of tokens within the filter or folder object.
//  The iStart and iEnd may be one of the following:
//  1. AT_START (-1), the index will be at the start of the expression.
//  2. AT_END (-2), the index will be at the end of the expression.
//  3. For any other valid indexes, the tokens will be manipulated within the given indexes
//
//  Parameters:
//      HANDLE hObject                  Handle to either filter or folder.
//      DWORD dwFlags
//      INT iStart
//      INT iEnd
//
//  Returns:
//      SMS_STATUS                      Status. Either SMS_OK or one of the
//                                      error codes listed above.
//
//===========================================================================
//
//  SmsGetAllFilters
//
//  This API retrieves from the specified container a list of filter handles
//  that have been applied to that container.
//  It is important to note that once this has been called, the API
//  SmsCloseFilter must be called for each of the filters in the array.
//
//  Calling this with NULL for the array of filters will cause the *pctFilters
//  parameter to be set with the number of filters, in this case the API
//  will return a status of SMS_MORE_DATA.
//  The user should then allocate sufficient memory and call the API again.
//
//  Note that the container specified here is a normal (ie folder) container
//  and not a filter container.
//
//  Parameters:
//      HANDLE hContainer
//      HANDLE *pahFilters
//      DWORD *pctFilters
//
//  Returns:
//      SMS_STATUS                      Status. Either SMS_OK or one of the
//                                      error codes listed above.
//
//===========================================================================
//
//===========================================================================
//  8.  Object enumeration APIs.
//===========================================================================
//
//  SmsEnumObjectTypes
//
//  This API returns a list of first-class objects that are known to the
//  API.
//  These objects do not have a direct existence in the container hierarchy,
//  but play an important part in the API. The objects of major concern are
//  architectures and their descendents, but Platforms are also supported.
//
//  A first-class object is one that is known directly to the APIs and which
//  does not require any additional informaion. Thus the system knows
//  directly about architectures and platforms, while it cannot know about,
//  for instance, attributes, without first knowing about an architecture
//  and a groupclass.
//
//  The 'pObjects' parameter is an array of SMSBUFF objects. On successful
//  completion of the API this array will be filled with the names of
//  each first-class object known to the system.
//
//  On entry the 'pCtObjects' parameter tells the API the size of the
//  pObjects array. On exit it contains the actual number of objects
//  known to the system.
//  If this parameter is less than the number of objects known to the system
//  then it is still set to the total, but no information will have been
//  copied to the pObjects array, and a status of SMS_MORE_DATA will be
//  returned.
//
//  Parameters:
//      HANDLE hConnection              Handle to a connection that has been
//                                      established via SmsDataSourceConnect.
//      SMSBUFF *pObjects
//      DWORD *pCtObjects
//
//  Returns:
//      SMS_STATUS                      Status. Either SMS_OK or one of the
//                                      error codes listed above.
//
//===========================================================================
//
//  SmsEnumObjects
//
//  This object actually does the work of enumerating objects. For first-
//  class objects (see above) the 'pPredecessor' parameter is not used,
//  in this case it may be set to NULL. For non first-class objects this
//  list states the predecessor objects that must be given to the system
//  in order for it to locate the requested object.
//
//  The 'ctPredecessors' parameter tells the API the number of entries in the
//  predecessor list.
//
//  'pszObjectType' tells the API what object type the user is interested in.
//
//  'pObjects' is an array of OBJDESCRIPTORS, this array will be filled in
//  with details of the requested object type.
//
//  'pCtObjects' is a pointer to a DWORD. On entry it tells the API the number
//  of entries in 'pObjects'. On exit it is always set to then count of
//  objects of the specified type. If the entry value is less than the actual
//  number of objects then no data is copied and a status of SMS_NMO_MORE_DATA
//  is returned.
//
//  Consider an example.
//  If we want to enumerate the attributes in the 'MICROSOFT|IDENTIFICATION|1.0'
//  groupclass for 'Personal Computer' objects then we would set the parameters
//  as follows:
//      pszObjectType    = "MICROSOFT|IDENTIFICATION|1.0"
//      pPredecessors[0] = "Architectures"
//      pPredecessors[1] = "Personal Computer"
//      ctPredecessors   = 2
//      pObjects - you can declare it as 'OBJDESCRIPTOR pObjects[SOME_SIZE]'
//      *pCtObjects      = SOME_SIZE
//
//  On exit the pObjects array would have 9 entries (as currently defined,
//  this can change). The first entry would look like this:
//      pObjects[0].objType          = OT_ATTRIBUTE
//      pObjects[0].szName           = 'Name"
//      pObjects[0].szFriendlyName - unused
//      pObjects[0].bGotFriendlyName = FALSE
//      pObjects[0].dwRelopMin       = QOP_STR_EQ
//      pObjects[0].dwRelopMax       = QOP_UPCASE_NOTLIKE
//      pObjects[0].bGotRelops       = TRUE

//  Parameters:
//      HANDLE hConn
//      char *pszObjectType
//      SMSBUFF *pPredecessors
//      DWORD ctPredecessors
//      OBJDESCRIPTOR *pObjects
//      DWORD *pCtObjects
//
//  Returns:
//      SMS_STATUS                      Status. Either SMS_OK or one of the
//                                      error codes listed above.
//
//===========================================================================



// ====================================================================
//      Version number API.
// ====================================================================
__declspec (dllexport) SMS_STATUS SmsAPIVer( char **ppVersion 

⌨️ 快捷键说明

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