Ignore:
Timestamp:
Sep 9, 1999, 12:25:54 PM (26 years ago)
Author:
phaller
Message:

Fix: shell32 improvements

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/shell32/new/shell.cpp

    r860 r891  
    7878static int SHELL_Attach = 0;
    7979
    80 /***********************************************************************
    81  * SHELL_DllEntryPoint [SHELL.entry]
    82  *
    83  * Initialization code for shell.dll. Automatically loads the
    84  * 32-bit shell32.dll to allow thunking up to 32-bit code.
    85  *
    86  * RETURNS:
    87  */
    88 BOOL WINAPI SHELL_DllEntryPoint(DWORD Reason, HINSTANCE16 hInst,
    89                                 WORD ds, WORD HeapSize, DWORD res1, WORD res2)
    90 {
    91     TRACE_(shell)("(%08lx, %04x, %04x, %04x, %08lx, %04x)\n",
    92                   Reason, hInst, ds, HeapSize, res1, res2);
    93 
    94     switch(Reason)
    95     {
    96     case DLL_PROCESS_ATTACH:
    97         SHELL_Attach++;
    98         if (SHELL_hInstance)
    99         {
    100             ERR_(shell)("shell.dll instantiated twice!\n");
    101             /*
    102              * We should return FALSE here, but that will break
    103              * most apps that use CreateProcess because we do
    104              * not yet support seperate address-spaces.
    105              */
    106             return TRUE;
    107         }
    108 
    109         SHELL_hInstance = hInst;
    110         if(!SHELL_hInstance32)
    111         {
    112             if(!(SHELL_hInstance32 = LoadLibraryA("shell32.dll")))
    113             {
    114                 ERR_(shell)("Could not load sibling shell32.dll\n");
    115                 return FALSE;
    116             }
    117         }
    118         break;
    119 
    120     case DLL_PROCESS_DETACH:
    121         if(!--SHELL_Attach)
    122         {
    123             SHELL_hInstance = 0;
    124             if(SHELL_hInstance32)
    125                 FreeLibrary(SHELL_hInstance32);
    126         }
    127         break;
    128     }
    129     return TRUE;
    130 }
    13180
    13281/*************************************************************************
     
    244193}
    245194
    246 /*************************************************************************
    247  *                              DragFinish16            [SHELL.12]
    248  */
    249 void WINAPI DragFinish16(HDROP16 h)
    250 { TRACE_(shell)("\n");
    251     GlobalFree16((HGLOBAL16)h);
    252 }
    253 
    254195
    255196/*************************************************************************
     
    267208
    268209  GlobalUnlock(hDrop);
    269   return bRet;
    270 }
    271 
    272 /*************************************************************************
    273  *                              DragQueryPoint16                [SHELL.13]
    274  */
    275 BOOL16 WINAPI DragQueryPoint16(HDROP16 hDrop, POINT16 *p)
    276 {
    277   LPDROPFILESTRUCT16 lpDropFileStruct;
    278   BOOL16           bRet;
    279   TRACE_(shell)("\n");
    280   lpDropFileStruct = (LPDROPFILESTRUCT16) GlobalLock16(hDrop);
    281 
    282   memcpy(p,&lpDropFileStruct->ptMousePos,sizeof(POINT16));
    283   bRet = lpDropFileStruct->fInNonClientArea;
    284 
    285   GlobalUnlock16(hDrop);
    286210  return bRet;
    287211}
Note: See TracChangeset for help on using the changeset viewer.