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.
 
 
 
 
 
 

61 lines
1.7 KiB

//========================================================================
// Copyright (C) 1997 Microsoft Corporation
// Author: RameshV
// Description: This file has been generated. Pl look at the .c file
//========================================================================
#ifndef _MM_OPT_H
#define _MM_OPT_H
typedef struct _M_OPTION {
DWORD OptId;
DWORD Len;
ULONG UniqId;
BYTE Val[0];
} M_OPTION, *PM_OPTION, *LP_MOPTION;
DWORD _inline
MemOptInit(
OUT PM_OPTION *Opt,
IN DWORD OptId,
IN DWORD Len,
IN LPBYTE Val
) {
AssertRet(Opt, ERROR_INVALID_PARAMETER);
AssertRet(Len || NULL==Val, ERROR_INVALID_PARAMETER);
AssertRet(0 == Len|| Val, ERROR_INVALID_PARAMETER);
(*Opt) = MemAlloc(sizeof(M_OPTION)+Len);
if( NULL == (*Opt) ) return ERROR_NOT_ENOUGH_MEMORY;
(*Opt)->OptId = OptId;
(*Opt)->Len = Len;
memcpy((*Opt)->Val, Val, Len);
return ERROR_SUCCESS;
} // MemOptInit()
DWORD _inline
MemOptCleanup(
IN OUT PM_OPTION Opt
) {
AssertRet(Opt, ERROR_INVALID_PARAMETER);
MemFree(Opt);
return ERROR_SUCCESS;
}
LPBYTE _inline
MemOptVal(
IN PM_OPTION Opt
) {
return Opt->Val;
}
#endif // _MM_OPT_H_
//========================================================================
// end of file
//========================================================================