Hi,
I am trying to use the EvalCom2.dll to validate a MSI -
http://msdn.microsoft.com/library/de..._setstatus.asp
I have the following code so far...
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
using System.Security.Permissions;
namespace MsiIce
{
public delegate int DisplayVal ( IntPtr pContext , Int32 uiType ,
string szwVal , string szwDescription , string szwLocation );
public delegate bool Evalcomcallback ( Int32 iStatus , string
szwData , IntPtr pContext );
[GuidAttribute ( "6E5E1910-8053-4660-B795-6B612E29BC58" )]
[ClassInterfaceAttribute ( ClassInterfaceType.None )]
[ComImportAttribute ()]
[SecurityPermission ( SecurityAction.Demand , UnmanagedCode = true
)]
class EvalClass
{
[DllImport ( "evalcom2.dll" )]
public static extern int LPDisplayVal ( DisplayVal x , IntPtr y
);
public static extern int LPEVALCOMCALLBACK ( Evalcomcallback x
, IntPtr y );
}
[InterfaceTypeAttribute ( ComInterfaceType.InterfaceIsIUnknown )]
[GuidAttribute ( "E482E5C6-E31E-4143-A2E6-DBC3D8E4B8D3" )]
[ComImportAttribute ()]
public interface IValidate
{
Int32 OpenDatabase ( [MarshalAs ( UnmanagedType.LPWStr )]
string szDatabase );
Int32 CloseDatabase ( );
Int32 OpenCUB ( [MarshalAs ( UnmanagedType.LPWStr )] string
szCUBFile );
Int32 CloseCUB ( );
Int32 Validate ( [MarshalAs ( UnmanagedType.LPWStr )] string
szICEs );
Int32 SetDisplay ( [MarshalAs ( UnmanagedType.LPWStr )]
DisplayVal pDisplayFunction , IntPtr pContext );
Int32 SetStatus ( [MarshalAs ( UnmanagedType.LPWStr )]
Evalcomcallback pStatusFunction , IntPtr pContext );
}
}
I do not understand how to use this code with a program to preform the
function I need to validate the MSI..Any help will be great.. thank you
Josh