Ignore:
Timestamp:
Jan 20, 2003, 11:46:28 AM (23 years ago)
Author:
sandervl
Message:

Only load LVM.DLL when we actually need it; CreateProcess bugfix for thread id if launched directly; CreateFile returns ERROR_ALREADY_EXISTS if file not found and CREATE_NEW; Check and correct process type in thread wrapper

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/oslibmisc.cpp

    r9678 r9693  
    1 /* $Id: oslibmisc.cpp,v 1.16 2003-01-16 00:44:31 sandervl Exp $ */
     1/* $Id: oslibmisc.cpp,v 1.17 2003-01-20 10:46:28 sandervl Exp $ */
    22/*
    33 * Misc OS/2 util. procedures
     
    280280ULONG OSLibWinQueryMsgQueue(ULONG hab)
    281281{
    282   ULONG hmq;
    283 
    284   hmq = (ULONG)WinCreateMsgQueue((HAB)hab, 0);
     282  ULONG  hmq;
     283  APIRET rc;
     284  PTIB   ptib;
     285  PPIB   ppib;
     286
     287  rc = DosGetInfoBlocks(&ptib, &ppib);
     288  if(rc != NO_ERROR) {
     289      dprintf(("DosGetInfoBlocks failed with rc %d", rc));
     290      DebugInt3();
     291      return 0;
     292  }
     293  if(ppib->pib_ultype == 2) {
     294      dprintf(("Warning: app type changed back to VIO!!"));
     295      ppib->pib_ultype = 3;
     296  }
     297  hmq = WinQueueFromID(hab, ppib->pib_ulpid, ptib->tib_ptib2->tib2_ultid);
     298
    285299  if(!hmq) {
    286       PTIB ptib;
    287       PPIB ppib;
    288 
    289       DosGetInfoBlocks(&ptib, &ppib);
    290 
    291       hmq = WinQueueFromID(hab, ppib->pib_ulpid, ptib->tib_ptib2->tib2_ultid);
     300      dprintf(("WinQueueFromID %x %x %x proc type %x failed with error %x", hab, ppib->pib_ulpid, ptib->tib_ptib2->tib2_ultid, ppib->pib_ultype, WinGetLastError(hab)));
     301
     302      hmq = (ULONG)WinCreateMsgQueue((HAB)hab, 0);
     303      if(!hmq) {
     304          dprintf(("WinCreateMsgQueue failed with error %x", WinGetLastError(hab)));
     305      }
    292306  }
    293307  return hmq;
Note: See TracChangeset for help on using the changeset viewer.