Page 1 of 1

Terminateprocess for pocket?

Posted: Wed Feb 08, 2006 10:33 pm
by astursoft
one sample code please !

Code: Select all


HB_FUNC (MATAPRG)
{
   HWND hWnd;
   BOOL lRet = FALSE;

   hWnd = FindWindow (NULL, L"nPOP" );
   if (hWnd)
   {
     TerminateProcess(hWnd, 0);
    // PostMessage(hWnd ,WM_SYSCOMMAND,WM_DESTROY,0);
   lRet = TRUE;
   }
   hb_retl (lRet);
}


this does not work.

Posted: Thu Feb 09, 2006 2:04 pm
by astursoft
solved

Code: Select all

HB_FUNC (MATANPOP)
{
   HWND hWnd;
   BOOL lRet = FALSE;

   hWnd = FindWindow (NULL, L"nPOP" );
   if (hWnd)
   {
     PostMessage(hWnd ,0x0002,0,0);

   lRet = TRUE;
   }
   hb_retl (lRet);
}