예제 #1
0
파일: dllmain.c 프로젝트: Moteesh/reactos
NTSTATUS
WINAPI
User32CallOBMFromKernel(PVOID Arguments, ULONG ArgumentLength)
{
  BITMAP bmp;
  PSETOBM_CALLBACK_ARGUMENTS Common = Arguments;

  GetObjectW(LoadBitmapW(0, MAKEINTRESOURCEW(OBM_CLOSE)), sizeof(bmp), &bmp);
  Common->oembmi[OBI_CLOSE].cx = bmp.bmWidth;
  Common->oembmi[OBI_CLOSE].cy = bmp.bmHeight;

  GetObjectW(LoadBitmapW(0, MAKEINTRESOURCEW(OBM_MNARROW)), sizeof(bmp), &bmp);
  Common->oembmi[OBI_MNARROW].cx = bmp.bmWidth;
  Common->oembmi[OBI_MNARROW].cy = bmp.bmHeight;

  GetObjectW(LoadBitmapW(0, MAKEINTRESOURCEW(OBM_DNARROW)), sizeof(bmp), &bmp);
  Common->oembmi[OBI_DNARROW].cx = bmp.bmWidth;
  Common->oembmi[OBI_DNARROW].cy = bmp.bmHeight;

  GetObjectW(LoadBitmapW(0, MAKEINTRESOURCEW(OBM_DNARROWI)), sizeof(bmp), &bmp);
  Common->oembmi[OBI_DNARROWI].cx = bmp.bmWidth;
  Common->oembmi[OBI_DNARROWI].cy = bmp.bmHeight;

  GetObjectW(LoadBitmapW(0, MAKEINTRESOURCEW(OBM_UPARROW)), sizeof(bmp), &bmp);
  Common->oembmi[OBI_UPARROW].cx = bmp.bmWidth;
  Common->oembmi[OBI_UPARROW].cy = bmp.bmHeight;

  GetObjectW(LoadBitmapW(0, MAKEINTRESOURCEW(OBM_UPARROWI)), sizeof(bmp), &bmp);
  Common->oembmi[OBI_UPARROWI].cx = bmp.bmWidth;
  Common->oembmi[OBI_UPARROWI].cy = bmp.bmHeight;

  return ZwCallbackReturn(Arguments, ArgumentLength, STATUS_SUCCESS);
}
예제 #2
0
NTSTATUS
WINAPI
User32CallClientThreadSetupFromKernel(PVOID Arguments, ULONG ArgumentLength)
{
  ERR("GetConnected\n");
  return ZwCallbackReturn(NULL, 0, STATUS_SUCCESS);  
}
예제 #3
0
파일: dllmain.c 프로젝트: staring/RosFE
NTSTATUS
WINAPI
User32CallClientThreadSetupFromKernel(PVOID Arguments, ULONG ArgumentLength)
{
  TRACE("ClientThreadSetup\n");
  ClientThreadSetup();
  return ZwCallbackReturn(NULL, 0, STATUS_SUCCESS);
}
예제 #4
0
파일: dllmain.c 프로젝트: Moteesh/reactos
NTSTATUS
WINAPI
User32CallClientThreadSetupFromKernel(PVOID Arguments, ULONG ArgumentLength)
{
  TRACE("User32CallClientThreadSetupFromKernel -->\n");
  // FIXME: Disabling this call is a HACK!! See also ClientThreadSetup...
  // ClientThreadSetupHelper(TRUE);
  TRACE("<-- User32CallClientThreadSetupFromKernel\n");
  return ZwCallbackReturn(NULL, 0, STATUS_SUCCESS);
}
예제 #5
0
파일: dllmain.c 프로젝트: Moteesh/reactos
NTSTATUS
WINAPI
User32CallGetCharsetInfo(PVOID Arguments, ULONG ArgumentLength)
{
  BOOL Ret;
  PGET_CHARSET_INFO pgci = (PGET_CHARSET_INFO)Arguments;

  TRACE("GetCharsetInfo\n");

  Ret = TranslateCharsetInfo((DWORD *)(ULONG_PTR)pgci->Locale, &pgci->Cs, TCI_SRCLOCALE);

  return ZwCallbackReturn(Arguments, ArgumentLength, Ret ? STATUS_SUCCESS : STATUS_UNSUCCESSFUL);
}
예제 #6
0
NTSTATUS
WINAPI
User32CallSetWndIconsFromKernel(PVOID Arguments, ULONG ArgumentLength)
{
  PSETWNDICONS_CALLBACK_ARGUMENTS Common = Arguments;

  if (!hIconSmWindows)
  {
      hIconSmWindows = LoadImageW(0, IDI_WINLOGO, IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_DEFAULTCOLOR);
      hIconWindows   = LoadImageW(0, IDI_WINLOGO, IMAGE_ICON, 0, 0, LR_DEFAULTCOLOR);
  }
  Common->hIconSmWindows = hIconSmWindows;
  Common->hIconWindows = hIconWindows;
  ERR("hIconSmWindows %p hIconWindows %p \n",hIconSmWindows,hIconWindows);
  return ZwCallbackReturn(Arguments, ArgumentLength, STATUS_SUCCESS);
}
예제 #7
0
파일: dllmain.c 프로젝트: Moteesh/reactos
NTSTATUS WINAPI User32CallLPKFromKernel(PVOID Arguments, ULONG ArgumentLength)
{
    BOOL bResult;
    PLPK_CALLBACK_ARGUMENTS Argument;

    Argument = (PLPK_CALLBACK_ARGUMENTS)Arguments;

    Argument->lpString = (LPWSTR)((ULONG_PTR)Argument->lpString + (ULONG_PTR)Argument);

    bResult = ExtTextOutW(Argument->hdc,
                          Argument->x,
                          Argument->y,
                          Argument->flags,
                          (Argument->bRect) ? &Argument->rect : NULL,
                          Argument->lpString,
                          Argument->count,
                          NULL);

    return ZwCallbackReturn(&bResult, sizeof(BOOL), STATUS_SUCCESS);
}
예제 #8
0
파일: dllmain.c 프로젝트: Moteesh/reactos
NTSTATUS
WINAPI
User32CallSetWndIconsFromKernel(PVOID Arguments, ULONG ArgumentLength)
{
  PSETWNDICONS_CALLBACK_ARGUMENTS Common = Arguments;

  if (!gpsi->hIconSmWindows)
  {
      Common->hIconSample    = LoadImageW(0, IDI_APPLICATION, IMAGE_ICON, 0, 0, LR_DEFAULTSIZE);
      Common->hIconHand      = LoadImageW(0, IDI_HAND,        IMAGE_ICON, 0, 0, LR_DEFAULTSIZE);
      Common->hIconQuestion  = LoadImageW(0, IDI_QUESTION,    IMAGE_ICON, 0, 0, LR_DEFAULTSIZE);
      Common->hIconBang      = LoadImageW(0, IDI_EXCLAMATION, IMAGE_ICON, 0, 0, LR_DEFAULTSIZE);
      Common->hIconNote      = LoadImageW(0, IDI_ASTERISK,    IMAGE_ICON, 0, 0, LR_DEFAULTSIZE);
      Common->hIconWindows   = LoadImageW(0, IDI_WINLOGO,     IMAGE_ICON, 0, 0, LR_DEFAULTSIZE);
      Common->hIconSmWindows = LoadImageW(0, IDI_WINLOGO, IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0);
      hIconWindows   = Common->hIconWindows;
      hIconSmWindows = Common->hIconSmWindows;
  }
  ERR("hIconSmWindows %p hIconWindows %p \n",hIconSmWindows,hIconWindows);
  return ZwCallbackReturn(Arguments, ArgumentLength, STATUS_SUCCESS);
}
예제 #9
0
NTSTATUS WINAPI
User32CallHookProcFromKernel(PVOID Arguments, ULONG ArgumentLength)
{
  PHOOKPROC_CALLBACK_ARGUMENTS Common;
  CREATESTRUCTW Csw;
  CBT_CREATEWNDW CbtCreatewndw;
  PHOOKPROC_CBT_CREATEWND_EXTRA_ARGUMENTS CbtCreatewndExtra = NULL;
  KBDLLHOOKSTRUCT KeyboardLlData, *pKeyboardLlData;
  MSLLHOOKSTRUCT MouseLlData, *pMouseLlData;
  MSG *pcMsg, *pMsg;
  PMOUSEHOOKSTRUCT pMHook;
  CWPSTRUCT CWP, *pCWP;
  CWPRETSTRUCT CWPR, *pCWPR;
  PRECTL prl;  
  LPCBTACTIVATESTRUCT pcbtas;
  WPARAM wParam = 0;
  LPARAM lParam = 0;
  LRESULT Result = 0;
  BOOL Hit = FALSE;

  Common = (PHOOKPROC_CALLBACK_ARGUMENTS) Arguments;

  switch(Common->HookId)
  {
    case WH_CBT:
    {
      //ERR("WH_CBT: Code %d\n", Common->Code);
      switch(Common->Code)
      {
        case HCBT_CREATEWND:
          CbtCreatewndExtra = (PHOOKPROC_CBT_CREATEWND_EXTRA_ARGUMENTS)
                              ((PCHAR) Common + Common->lParam);
          RtlCopyMemory(&Csw, &CbtCreatewndExtra->Cs, sizeof(CREATESTRUCTW));
          CbtCreatewndw.lpcs = &Csw;
          CbtCreatewndw.hwndInsertAfter = CbtCreatewndExtra->WndInsertAfter;
          wParam = Common->wParam;
          lParam = (LPARAM) &CbtCreatewndw;
          //ERR("HCBT_CREATEWND: hWnd 0x%x Name 0x%x Class 0x%x\n", Common->wParam, Csw.lpszName, Csw.lpszClass);
          break;
        case HCBT_CLICKSKIPPED:
            pMHook = (PMOUSEHOOKSTRUCT)((PCHAR) Common + Common->lParam);
            lParam = (LPARAM) pMHook;
            break;
        case HCBT_MOVESIZE:
            prl = (PRECTL)((PCHAR) Common + Common->lParam);
            lParam = (LPARAM) prl;
            break;
        case HCBT_ACTIVATE:
            pcbtas = (LPCBTACTIVATESTRUCT)((PCHAR) Common + Common->lParam);
            lParam = (LPARAM) pcbtas;
            break;
        case HCBT_KEYSKIPPED: /* The rest SEH support */
        case HCBT_MINMAX:
        case HCBT_SETFOCUS:
        case HCBT_SYSCOMMAND:
        case HCBT_DESTROYWND:
        case HCBT_QS:
            wParam = Common->wParam;
            lParam = Common->lParam;
            break;
        default:
          ERR("HCBT_ not supported = %d\n", Common->Code);
          return ZwCallbackReturn(NULL, 0, STATUS_NOT_SUPPORTED);
      }

      if (Common->Proc)
      {
         _SEH2_TRY
         {
            Result = Common->Proc(Common->Code, wParam, lParam);
         }
         _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
         {
            Hit = TRUE;
         }
         _SEH2_END;
      }
      else
      {
         ERR("Null Proc! Common = 0x%x, Proc = 0x%x\n",Common,Common->Proc);
      }
      switch(Common->Code)
      {
        case HCBT_CREATEWND:
          CbtCreatewndExtra->WndInsertAfter = CbtCreatewndw.hwndInsertAfter; 
          CbtCreatewndExtra->Cs.x = CbtCreatewndw.lpcs->x;
          CbtCreatewndExtra->Cs.y = CbtCreatewndw.lpcs->y;
          CbtCreatewndExtra->Cs.cx = CbtCreatewndw.lpcs->cx;
          CbtCreatewndExtra->Cs.cy = CbtCreatewndw.lpcs->cy;
          break;
      }
      break;
    }
예제 #10
0
파일: dllmain.c 프로젝트: Moteesh/reactos
NTSTATUS
WINAPI
User32DeliverUserAPC(PVOID Arguments, ULONG ArgumentLength)
{
  return ZwCallbackReturn(0, 0, STATUS_SUCCESS);
}