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.
 
 
 
 
 
 

58 lines
1019 B

//
// util.h, some common utility classes
//
#include "SSRTE.h"
#pragma once
class CSafeArray
{
public:
CSafeArray( IN VARIANT * pVal);
ULONG GetSize()
{
return m_ulSize;
}
HRESULT GetElement (
IN REFIID guid,
IN ULONG ulIndex,
OUT IUnknown ** ppUnk
);
HRESULT GetElement (
IN ULONG ulIndex,
IN VARTYPE vt,
OUT VARIANT * pulVal
);
HRESULT GetElement (
IN ULONG ulIndex,
OUT VARIANT * pulVal
);
//
// we don't want anyone (include self) to be able to do an assignment
// or invoking copy constructor.
//
CSafeArray (const CSafeArray& );
void operator = (const CSafeArray& );
private:
SAFEARRAY * m_pSA;
VARIANT * m_pVal;
ULONG m_ulSize;
bool m_bValidArray;
};