PDA

View Full Version : معادل shell در c# (smart device and pda)



mirzaei_2000
دوشنبه 30 آبان 1384, 11:20 صبح
سلام .
من برای PDA دارم یه برنامه می نویسم . میخوام توی برنامم یه برنامه دیگه مثل ماشین حساب رو اجرا کنم . کدی های زیادی هم برای اینکار پیدا کردم ولی هیچکدام جواب ندادند . لطفا منو راهنمایی کنید .
یکی از این کدها که همه جا میگن جواب میده ولی ما که نتونستیم جواب بگیریم.
[DllImport("rapi.dll", CharSet=CharSet.Unicode)]
public static extern Int32 CeCreateProcess(
string lpApplicationName,
int Zero,
int Res1,
int Res2,
int Res3,
int dwCreationFlags,
int Res4,
int Res5,
int Res6,
ref PROCESS_INFORMATION lpProcessInformation);
[StructLayout(LayoutKind.Sequential)]
public struct PROCESS_INFORMATION
{
public IntPtr hProcess;
public IntPtr hThread;
public int dwProcessId;
public int dwThreadId;
}
//////
string strProg=@"\windows\calc.exe";
PROCESS_INFORMATION pi=new PROCESS_INFORMATION();
CeCreateProcess(strProg,0,0,0,0,0,0,0,0,ref pi);

MiRHaDi
چهارشنبه 02 آذر 1384, 23:50 عصر
سلام
برای اینکه دوستان بتونند کد رو بخونند دوباره در زیر درست مینویسمش :
<code>
[DllImport("rapi.dll", CharSet=CharSet.Unicode)]
public static extern Int32 CeCreateProcess(
string lpApplicationName,
int Zero,
int Res1,
int Res2,
int Res3,
int dwCreationFlags,
int Res4,
int Res5,
int Res6,
ref PROCESS_INFORMATION lpProcessInformation);
[StructLayout(LayoutKind.Sequential)]
public struct PROCESS_INFORMATION
{
public IntPtr hProcess;
public IntPtr hThread;
public int dwProcessId;
public int dwThreadId;
}
//////
string strProg=@"\windows\calc.exe";
PROCESS_INFORMATION pi=new PROCESS_INFORMATION();
CeCreateProcess(strProg,0,0,0,0,0,0,0,0,ref pi
</code>