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.
 
 
 
 
 
 

63 lines
1.2 KiB

// MsiDatabase.cpp: implementation of the CMsiDatabase class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include <stdlib.h>
#include "MsiDatabase.h"
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
/*
CMsiDatabase::CMsiDatabase()
{
// MSIHANDLE hInstall // installer handle
}
*/
CMsiDatabase::CMsiDatabase(MSIHANDLE hInstall)
{
UNREFERENCED_PARAMETER( hInstall );
// m_hInstall = hInstall;
// m_hDatabase = MsiGetActiveDatabase(hInstall);
// *m_pszBuf = new TCHAR(sizeof(BUFFERSIZE));
}
CMsiDatabase::~CMsiDatabase()
{
delete *m_pszBuf;
}
int CMsiDatabase::GetProperty(TCHAR* name, TCHAR** pszBuf)
{
DWORD cbSize = BUFFERSIZE;
ZeroMemory( *m_pszBuf, BUFFERSIZE );
*pszBuf = *m_pszBuf;
int rt = MsiGetProperty( m_hInstall, name, *pszBuf, &cbSize );
if(rt == ERROR_SUCCESS)
{
return TRUE;
}
return FALSE;
}
BOOL CMsiDatabase::SetProperty(TCHAR* ptName, TCHAR* ptValue)
{
int rt = MsiSetProperty( m_hInstall, ptName, ptValue );
if(rt == ERROR_SUCCESS)
{
return TRUE;
}
return FALSE;
}