CeRunAppAtTime

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());

}
 
G

Guest

Sure, look at the API definition. It tkes a SYSTEMTIME*, you passing it a
SYSTEMTIME. Pass the struct as ref or make it a class.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top