J
jacliffe
Could anyone please help? The following code when run always returns false
for CeRunAppAtTime. Would anyone know why?
Many thanks
john
public struct SystemTime
{public UInt16 Year;
public UInt16 Month;
public UInt16 DayOfWeek;
public UInt16 Day;
public UInt16 Hour;
public UInt16 Minute;
public UInt16 Second;
public UInt16 MilliSecond;
}
[DllImport("CoreDll.dll")]
public static extern bool CeRunAppAtTime(string runpro, SystemTime
threemin);
[MTAThread]
static void Main()
{
bool testrunapp;
string path = @"windows\calc.exe";
if (File.Exists(path))
{
SystemTime dtNextRunTime = new SystemTime();
dtNextRunTime.Year = 2007;
dtNextRunTime.Month = 4;
dtNextRunTime.DayOfWeek = 1;
dtNextRunTime.Day = 2;
dtNextRunTime.Hour = 1;
dtNextRunTime.Minute = 35;
dtNextRunTime.Second = 35;
dtNextRunTime.MilliSecond = 0;
testrunapp = CeRunAppAtTime(path, dtNextRunTime);
)
Application.Run(new Form1());
}
for CeRunAppAtTime. Would anyone know why?
Many thanks
john
public struct SystemTime
{public UInt16 Year;
public UInt16 Month;
public UInt16 DayOfWeek;
public UInt16 Day;
public UInt16 Hour;
public UInt16 Minute;
public UInt16 Second;
public UInt16 MilliSecond;
}
[DllImport("CoreDll.dll")]
public static extern bool CeRunAppAtTime(string runpro, SystemTime
threemin);
[MTAThread]
static void Main()
{
bool testrunapp;
string path = @"windows\calc.exe";
if (File.Exists(path))
{
SystemTime dtNextRunTime = new SystemTime();
dtNextRunTime.Year = 2007;
dtNextRunTime.Month = 4;
dtNextRunTime.DayOfWeek = 1;
dtNextRunTime.Day = 2;
dtNextRunTime.Hour = 1;
dtNextRunTime.Minute = 35;
dtNextRunTime.Second = 35;
dtNextRunTime.MilliSecond = 0;
testrunapp = CeRunAppAtTime(path, dtNextRunTime);
)
Application.Run(new Form1());
}