Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

46 lines
1.3 KiB

//----------------------------------------------------------------------------
//
// Simple parameter string parsing.
//
// Copyright (C) Microsoft Corporation, 2000-2002.
//
//----------------------------------------------------------------------------
#ifndef __PPARSE_HPP__
#define __PPARSE_HPP__
//----------------------------------------------------------------------------
//
// ParameterStringParser.
//
//----------------------------------------------------------------------------
#define MAX_PARAM_NAME 32
#define MAX_PARAM_VALUE 256
#define PARSER_INVALID 0xffffffff
class ParameterStringParser
{
public:
PCSTR m_Name;
ParameterStringParser(void);
virtual ULONG GetNumberParameters(void) = 0;
virtual void GetParameter(ULONG Index,
PSTR Name, ULONG NameSize,
PSTR Value, ULONG ValueSize) = 0;
virtual void ResetParameters(void) = 0;
virtual BOOL SetParameter(PCSTR Name, PCSTR Value) = 0;
BOOL ParseParameters(PCSTR ParamString);
BOOL GetParameters(PSTR Buffer, ULONG BufferSize);
// Scan the names array for the <name> part of
// a <name>:<parameters> string.
static ULONG GetParser(PCSTR ParamString, ULONG NumNames, PCSTR* Names);
};
#endif // #ifndef __PPARSE_HPP__