ข่าวสารและการฝึกอบรม

เทคนิค ถาม และ ตอบ

Calling CreateProcess to launch ActiveSync cause memory leakage?

  • no.2332
  • 2003-07-17
Hi, I attempt to lauch ActiveSync application using my program using WinCE using CreateProcess function. It seems to work well. However, there's a problem that I observed. After ActiveSync has started and stopped (manually), I noticed that the memory does not restored. I based on the system's Memory setting and look at the Free memory available. Seems like everytime ActiveSync is launched, about 10k of memory is lost. The code fragement I have is as followed: ... PROCESS_INFORMATION ProcInfo; CreateProcess(L"repllog.exe", 0, 0, 0, 0, 0, 0, 0, 0, &ProcInfo); while (WaitForSingleObject(ProcInfo.hProcess, 500) != WAIT_OBJECT_0); // Now exit... CloseHandle(ProcInfo.hProcess); CloseHandle(ProcInfo.hThread); ... Anyone has come across this problem before? Thanks for any comment and feedback! Regards, ZhiJie