Ignore:
Timestamp:
Oct 9, 1999, 1:13:46 PM (26 years ago)
Author:
sandervl
Message:

Moved new shell32 to current dir

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/shell32/misc.cpp

    r972 r1214  
    1 /* $Id: misc.cpp,v 1.4 1999-09-18 15:57:51 sandervl Exp $ */
     1/* $Id: misc.cpp,v 1.5 1999-10-09 11:13:19 sandervl Exp $ */
    22
    33/*
     
    1515 *****************************************************************************/
    1616
    17 #include <os2win.h>
    18 #include <shellapi.h>
     17#include <odin.h>
    1918#include <wchar.h>
    2019#include <wcstr.h>
     20
     21#define ICOM_CINTERFACE 1
     22
     23//#include <os2win.h>
     24#include <shellapi.h>
    2125#include <winnls.h>
    22 #include "shell32.h"
     26#include "shell32_main.h"
    2327#include <misc.h>
    24 #include <string.h>
    25 #include "winbase.h"
     28//#include <string.h>
     29//#include "winbase.h"
    2630#include <heapstring.h>
    2731
     
    3034 *****************************************************************************/
    3135
    32 
    33 /*****************************************************************************
    34  * Name      : LPWSTR* WIN32API CommandLineToArgvW
    35  * Purpose   :
    36  * Parameters:
    37  * Variables :
    38  * Result    :
    39  * Remark    :
    40  * Status    : UNTESTED STUB
    41  *
    42  * Author    : Patrick Haller [Sat, 1998/07/11 11:55]
    43  *****************************************************************************/
    44 
    45 LPWSTR * WIN32API CommandLineToArgvW(LPCWSTR lpCmdLine,
    46                                      int     *pNumArgs)
    47 {
    48   LPWSTR *argv, s, t;
    49   int     i;
    50 
    51   dprintf(("SHELL32: CommandLineToArgvW(%s,%08xh)\n",
    52            lpCmdLine,
    53            pNumArgs));
    54 
    55   s = (LPWSTR)lpCmdLine;
    56   i = 0;
    57   while (*s) {
    58     /* space */
    59     if (*s==0x0020) {
    60         i++;
    61         s++;
    62         while (*s && *s==0x0020)
    63             s++;
    64         continue;
    65     }
    66     s++;
    67   }
    68   argv = (LPWSTR *)LocalAlloc(LPTR, sizeof(LPWSTR)*(i+1));
    69   s = t = (LPWSTR)lpCmdLine;
    70   i = 0;
    71   while(*s) {
    72     if (*s==0x0020) {
    73         *s=0;
    74         argv[i++] = t;
    75         *s=0x0020;
    76         while (*s && *s==0x0020)
    77             s++;
    78         if(*s)
    79             t=s+1;
    80         else    t=s;
    81         continue;
    82     }
    83     s++;
    84   }
    85   if(*t)
    86     argv[i++] = t;
    87 
    88   argv[i]=NULL;
    89   *pNumArgs = i;
    90   return argv;
    91 }
    92 
    93 
    94 /*****************************************************************************
    95  * Name      : HICON WIN32API ExtractIconA
    96  * Purpose   :
    97  * Parameters:
    98  * Variables :
    99  * Result    :
    100  * Remark    :
    101  * Status    : UNTESTED STUB
    102  *
    103  * Author    : Patrick Haller [Sat, 1998/07/11 11:55]
    104  *****************************************************************************/
    105 
    106 HICON WIN32API ExtractIconA(HINSTANCE hInst,
    107                             LPCSTR    lpszExeFileName,
    108                             UINT      nIconIndex)
    109 {
    110   dprintf(("SHELL32: ExtractIconA(%08xh,%s,%08xh) not implemented.\n",
    111            hInst,
    112            lpszExeFileName,
    113            nIconIndex));
    114 
    115   return(NULL);
    116 }
    117 
    118 
    119 /*****************************************************************************
    120  * Name      : HICON WIN32API ExtractIconW
    121  * Purpose   :
    122  * Parameters:
    123  * Variables :
    124  * Result    :
    125  * Remark    :
    126  * Status    : UNTESTED STUB
    127  *
    128  * Author    : Patrick Haller [Sat, 1998/07/11 11:55]
    129  *****************************************************************************/
    130 
    131 HICON WIN32API ExtractIconW(HINSTANCE hInst,
    132                                LPCWSTR   lpszExeFileName,
    133                                UINT      nIconIndex)
    134 {
    135   HICON hicon = NULL;
    136   char *astring = UnicodeToAsciiString((LPWSTR)lpszExeFileName);
    137 
    138   dprintf(("SHELL32: ExtractIconW(%08xh,%s,%08xh) not implemented.\n",
    139            hInst,
    140            lpszExeFileName,
    141            nIconIndex));
    142 
    143 
    144   FreeAsciiString(astring);
    145   return(hicon);
    146 }
    147 
    148 
    149 /*****************************************************************************
    150  * Name      : HICON WIN32API ExtractIconExA
    151  * Purpose   :
    152  * Parameters:
    153  * Variables :
    154  * Result    :
    155  * Remark    :
    156  * Status    : UNTESTED STUB
    157  *
    158  * Author    : Patrick Haller [Sat, 1998/07/11 11:55]
    159  *****************************************************************************/
    160 
    161 DWORD WIN32API ExtractIconExA(LPCSTR lpszFile,
    162                               int    nIconIndex,
    163                               HICON  *phiconLarge,
    164                               HICON  *phiconSmall,
    165                               UINT   nIcons)
    166 {
    167   dprintf(("SHELL32: ExtractIconExA(%s,%08xh,%08xh,%08xh,%u) not implemented.\n",
    168            lpszFile,
    169            nIconIndex,
    170            phiconLarge,
    171            phiconSmall,
    172            nIcons));
    173 
    174   return (0);
    175 }
    176 
    177 
    178 /*****************************************************************************
    179  * Name      : HICON WIN32API ExtractIconExW
    180  * Purpose   :
    181  * Parameters:
    182  * Variables :
    183  * Result    :
    184  * Remark    :
    185  * Status    : UNTESTED STUB
    186  *
    187  * Author    : Patrick Haller [Sat, 1998/07/11 11:55]
    188  *****************************************************************************/
    189 
    190 HICON WIN32API ExtractIconExW(LPCWSTR lpszFile,
    191                               int    nIconIndex,
    192                               HICON  *phiconLarge,
    193                               HICON  *phiconSmall,
    194                               UINT   nIcons)
    195 {
    196   dprintf(("SHELL32: ExtractIconExW(%s,%08xh,%08xh,%08xh,%u) not implemented.\n",
    197            lpszFile,
    198            nIconIndex,
    199            phiconLarge,
    200            phiconSmall,
    201            nIcons));
    202 
    203   return (0);
    204 }
    205 
    206 
    207 /*****************************************************************************
    208  * Name      : HINSTANCE WIN32API FindExecutableA
    209  * Purpose   :
    210  * Parameters:
    211  * Variables :
    212  * Result    :
    213  * Remark    :
    214  * Status    : UNTESTED STUB
    215  *
    216  * Author    : Patrick Haller [Sat, 1998/07/11 11:55]
    217  *****************************************************************************/
    218 
    219 HINSTANCE WIN32API FindExecutableA(LPCSTR lpszFile,
    220                                    LPCSTR lpszDir,
    221                                    LPTSTR lpszResult)
    222 {
    223   dprintf(("SHELL32: FindExecutableA (%s,%s,%s) not implemented.\n",
    224            lpszFile,
    225            lpszDir,
    226            lpszResult));
    227 
    228   return(NULL);
    229 }
    230 
    231 
    232 /*****************************************************************************
    233  * Name      : HINSTANCE WIN32API FindExecutableW
    234  * Purpose   :
    235  * Parameters:
    236  * Variables :
    237  * Result    :
    238  * Remark    :
    239  * Status    : UNTESTED STUB
    240  *
    241  * Author    : Patrick Haller [Sat, 1998/07/11 11:55]
    242  *****************************************************************************/
    243 
    244 HINSTANCE WIN32API FindExecutableW(LPCWSTR lpszFile,
    245                                    LPCWSTR lpszDir,
    246                                    LPWSTR  lpszResult)
    247 {
    248   dprintf(("SHELL32: FindExecutableW (%s,%s,%s) not implemented.\n",
    249            lpszFile,
    250            lpszDir,
    251            lpszResult));
    252 
    253   return(NULL);
    254 }
    255 
    256 
    257 /*****************************************************************************
    258  * Name      : HICON WIN32API ExtractAssociatedIconA
    259  * Purpose   : Return icon for given file (either from file itself or from associated
    260  *             executable) and patch parameters if needed.
    261  * Parameters:
    262  * Variables :
    263  * Result    :
    264  * Remark    : SHELL.36
    265  * Status    : UNTESTED STUB
    266  *
    267  * Author    : Patrick Haller [Sat, 1998/07/11 11:55]
    268  *****************************************************************************/
    269 
    270 HICON WIN32API ExtractAssociatedIconA(HINSTANCE hInst,
    271                                       LPSTR     lpIconPath,
    272                                       LPWORD    lpiIcon)
    273 {
    274   HICON hIcon;
    275 
    276   dprintf(("SHELL32: ExtractAssociatedIconA(%08xh,%s,%08xh)\n",
    277            hInst,
    278            lpIconPath,
    279            lpiIcon));
    280 
    281   hIcon = ExtractIconA(hInst,
    282                        lpIconPath,
    283                        *lpiIcon);
    284 
    285   if( hIcon < 2 )
    286   {
    287     if( hIcon == 1 ) /* no icons found in given file */
    288     {
    289       char tempPath[0x80];
    290       UINT uRet = FindExecutableA(lpIconPath,
    291                                   NULL,
    292                                   tempPath);
    293 
    294       if(uRet > 32 && tempPath[0])
    295       {
    296         strcpy(lpIconPath,tempPath);
    297         hIcon = ExtractIconA(hInst,
    298                              lpIconPath,
    299                              *lpiIcon);
    300         if( hIcon > 2 )
    301           return hIcon;
    302       }
    303       else
    304         hIcon = 0;
    305      }
    306 
    307      if( hIcon == 1 )
    308        *lpiIcon = 2;   /* MSDOS icon - we found .exe but no icons in it */
    309      else
    310        *lpiIcon = 6;   /* generic icon - found nothing */
    311 
    312      /* @@@PH - how is this supposed to work ?
    313      GetModuleFileNameA(hInst,
    314                         lpIconPath,
    315                         0x80);
    316      hIcon = LoadIconA(hInst,
    317                        *lpiIcon);
    318       */
    319   }
    320   return hIcon;
    321 }
    32236
    32337/*****************************************************************************
     
    397111
    398112  return ExtractAssociatedIconW(hInst,lpIconPath,lpiIcon);
    399 }
    400 
    401 /*****************************************************************************
    402  * Name      : ParseField
    403  * Purpose   :
    404  * Parameters:
    405  * Variables :
    406  * Result    :
    407  * Remark    : SHELL32.58
    408  * Status    : UNTESTED UNKNOWN STUB
    409  *
    410  * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
    411  *****************************************************************************/
    412 
    413 DWORD WIN32API ParseFieldA(LPCSTR src,
    414                            DWORD  field,
    415                            LPSTR  dst,
    416                            DWORD  len)
    417 {
    418   dprintf(("SHELL32: ParseFieldA(%s,%08xh,%08xh,%08xh) not correctly implemented.\n",
    419            src,
    420            field,
    421            dst,
    422            len));
    423 
    424   if (!src || !src[0] || !dst || !len)
    425     return 0;
    426 
    427   if (field >1)
    428   {
    429     field--;
    430     while (field)
    431     {
    432       if (*src==0x0) return FALSE;
    433       if (*src==',') field--;
    434       src++;
    435     }
    436   }
    437 
    438   while (*src!=0x00 && *src!=',' && len>0)
    439   {
    440     *dst=*src; dst++, src++; len--;
    441   }
    442   *dst=0x0;
    443   return TRUE;
    444 }
    445 
    446 
    447 /*****************************************************************************
    448  * Name      : PickIconDlg
    449  * Purpose   :
    450  * Parameters:
    451  * Variables :
    452  * Result    :
    453  * Remark    : SHELL32.62
    454  * Status    : UNTESTED UNKNOWN STUB
    455  *
    456  * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
    457  *****************************************************************************/
    458 
    459 DWORD WIN32API PickIconDlg(DWORD x,DWORD y,DWORD z,DWORD a)
    460 {
    461   dprintf(("SHELL32: PickIconDlg(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
    462            x,
    463            y,
    464            z,
    465            a));
    466 
    467   return 0xffffffff;
    468 }
    469 
    470 
    471 /*****************************************************************************
    472  * Name      : GetFileNameFromBrowse
    473  * Purpose   :
    474  * Parameters:
    475  * Variables :
    476  * Result    :
    477  * Remark    : SHELL32.63
    478  * Status    : UNTESTED UNKNOWN STUB
    479  *
    480  * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
    481  *****************************************************************************/
    482 
    483 DWORD WIN32API GetFileNameFromBrowse(HWND   howner,
    484                                      LPSTR  targetbuf,
    485                                      DWORD  len,
    486                                      DWORD  x,
    487                                      LPCSTR suffix,
    488                                      LPCSTR y,
    489                                      LPCSTR cmd)
    490 {
    491   dprintf(("SHELL32: GetFileNameFromBrowse(%08xh,  %08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
    492            howner,
    493            targetbuf,
    494            len,
    495            x,
    496            suffix,
    497            y,
    498            cmd));
    499 
    500   /* puts up a Open Dialog and requests input into targetbuf */
    501   /* OFN_HIDEREADONLY|OFN_NOCHANGEDIR|OFN_FILEMUSTEXIST|OFN_unknown */
    502   strcpy(targetbuf,
    503          "x:\\dummy.exe");
    504 
    505   return 1;
    506113}
    507114
     
    570177                              lpWide,
    571178                              nWide);
    572 }
    573 
    574 
    575 /*****************************************************************************
    576  * Name      : RegisterShellHook
    577  * Purpose   :
    578  * Parameters:
    579  * Variables :
    580  * Result    :
    581  * Remark    : SHELL32.181
    582  * Status    : UNTESTED UNKNOWN STUB
    583  *
    584  * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
    585  *
    586  * PARAMS
    587  *      hwnd [I]  window handle
    588  *      y    [I]  flag ????
    589  *
    590  * NOTES
    591  *     exported by ordinal
    592  */
    593 
    594 void WIN32API RegisterShellHook(HWND  hwnd,
    595                                 DWORD y)
    596 {
    597   dprintf(("SHELL32: RegisterShellHook(%08xh, %08xh) not implemented.\n",
    598            hwnd,
    599            y));
    600 }
    601 
    602 
    603 /*****************************************************************************
    604  * Name      : RunFileDlg
    605  * Purpose   :
    606  * Parameters:
    607  * Variables :
    608  * Result    :
    609  * Remark    : SHELL32.61
    610  * Status    : UNTESTED UNKNOWN STUB
    611  *
    612  * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
    613  *****************************************************************************/
    614 
    615 DWORD WIN32API RunFileDlg (HWND  hwndOwner,
    616                            DWORD dwParam1,
    617                            DWORD dwParam2,
    618                            LPSTR lpszTitle,
    619                            LPSTR lpszPrompt,
    620                            UINT  uFlags)
    621 {
    622   dprintf(("SHELL32: RunFileDlg(%08xh,%08xh,%08xh,%s,%s,%08xh) not implemented.\n",
    623            hwndOwner,
    624            dwParam1,
    625            dwParam2,
    626            lpszTitle,
    627            lpszPrompt,
    628            uFlags));
    629 
    630   return 0;
    631 }
    632 
    633 
    634 /*****************************************************************************
    635  * Name      : ExitWindowsDialog
    636  * Purpose   :
    637  * Parameters:
    638  * Variables :
    639  * Result    :
    640  * Remark    : SHELL32.60
    641  * Status    : UNTESTED UNKNOWN STUB
    642  *
    643  * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
    644  *****************************************************************************/
    645 
    646 void WIN32API ExitWindowsDialog (HWND hWndOwner)
    647 {
    648   dprintf(("SHELL32: ExitWindowsDialog(%08xh)\n",
    649            hWndOwner));
    650 
    651    if (MessageBoxA(hWndOwner,
    652                    "Do you want to exit ODIN?",
    653                    "Shutdown",
    654                    MB_YESNO|MB_ICONQUESTION)
    655        == IDOK)
    656    {
    657      SendMessageA (hWndOwner,
    658                    WM_QUIT,
    659                    0,
    660                    0);
    661    }
    662 }
    663 
    664 
    665 /*****************************************************************************
    666  * Name      : ArrangeWindows
    667  * Purpose   :
    668  * Parameters:
    669  * Variables :
    670  * Result    :
    671  * Remark    : SHELL32.184
    672  * Status    : UNTESTED UNKNOWN STUB
    673  *
    674  * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
    675  *****************************************************************************/
    676 
    677 DWORD WIN32API ArrangeWindows (DWORD dwParam1,
    678                                DWORD dwParam2,
    679                                DWORD dwParam3,
    680                                DWORD dwParam4,
    681                                DWORD dwParam5)
    682 {
    683   dprintf(("SHELL32: ArrangeWindows(%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
    684            dwParam1,
    685            dwParam2,
    686            dwParam3,
    687            dwParam4,
    688            dwParam5));
    689 
    690   return 0;
    691 }
    692 
    693 
    694 /*****************************************************************************
    695  * Name      : SignalFileOpen
    696  * Purpose   :
    697  * Parameters:
    698  * Variables :
    699  * Result    :
    700  * Remark    : SHELL32.103
    701  * Status    : UNTESTED UNKNOWN STUB
    702  *
    703  * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
    704  *****************************************************************************/
    705 
    706 DWORD WIN32API SignalFileOpen (DWORD dwParam1)
    707 {
    708   dprintf(("SHELL32: SignalFileOpen(%08xh) not implemented.\n",
    709            dwParam1));
    710 
    711   return 0;
    712 }
    713 
    714 
    715 /*****************************************************************************
    716  * Name      : DAD_ShowDrawImage
    717  * Purpose   :
    718  * Parameters:
    719  * Variables :
    720  * Result    :
    721  * Remark    : SHELL32.137
    722  * Status    : UNTESTED UNKNOWN STUB
    723  *
    724  * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
    725  *****************************************************************************/
    726 
    727 HRESULT WIN32API DAD_ShowDragImage (DWORD u)
    728 {
    729   dprintf(("SHELL32: DAD_ShowDragImage(%08xh) not implemented.\n",
    730            u));
    731 
    732   return 0;
    733 }
    734 
    735 
    736 /*****************************************************************************
    737  * Name      : ReadCabinetState
    738  * Purpose   :
    739  * Parameters:
    740  * Variables :
    741  * Result    :
    742  * Remark    : SHELL32.651
    743  * Status    : UNTESTED UNKNOWN STUB
    744  *
    745  * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
    746  *****************************************************************************/
    747 
    748 HRESULT WIN32API ReadCabinetState(DWORD u,
    749                                   DWORD v)
    750 {
    751   dprintf(("SHELL32: ReadCabinetState(%08xh, %08xh) not implemented.\n",
    752            u,
    753            v));
    754 
    755   return 0;
    756 }
    757 
    758 
    759 /*****************************************************************************
    760  * Name      : WriteCabinetState
    761  * Purpose   :
    762  * Parameters:
    763  * Variables :
    764  * Result    :
    765  * Remark    : SHELL32.652
    766  * Status    : UNTESTED UNKNOWN STUB
    767  *
    768  * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
    769  *****************************************************************************/
    770 
    771 HRESULT WIN32API WriteCabinetState(DWORD u)
    772 {
    773   dprintf(("SHELL32: WriteCabinetState(%08xh) not implemented.\n",
    774            u));
    775 
    776   return 0;
    777 }
    778 
    779 
    780 /*****************************************************************************
    781  * Name      : FileIconInit
    782  * Purpose   :
    783  * Parameters:
    784  * Variables :
    785  * Result    :
    786  * Remark    : SHELL32.660
    787  * Status    : UNTESTED UNKNOWN STUB
    788  *
    789  * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
    790  *****************************************************************************/
    791 
    792 BOOL WIN32API FileIconInit(BOOL bFullInit)
    793 {
    794   dprintf(("SHELL32: FileIconInit(%08xh) not implemented.\n",
    795            bFullInit));
    796 
    797   return 0;
    798 }
    799 
    800 
    801 /*****************************************************************************
    802  * Name      : IsUserAdmin
    803  * Purpose   :
    804  * Parameters:
    805  * Variables :
    806  * Result    :
    807  * Remark    : SHELL32.680
    808  * Status    : UNTESTED UNKNOWN STUB
    809  *
    810  * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
    811  *****************************************************************************/
    812 
    813 HRESULT WIN32API IsUserAdmin(void)
    814 {
    815   dprintf(("SHELL32: IsUserAdmin() not implmented. Yes, user is admin ;-)\n"));
    816 
    817   return TRUE;
    818179}
    819180
     
    888249}
    889250
    890 /*****************************************************************************
    891  * Name      : StrChrW
    892  * Purpose   :
    893  * Parameters:
    894  * Variables :
    895  * Result    :
    896  * Remark    : SHELL32.651
    897  * Status    : UNTESTED UNKNOWN STUB
    898  *
    899  * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
    900  *****************************************************************************/
    901 
    902 LPWSTR WIN32API StrChrW (LPWSTR str,
    903                          WCHAR  x)
    904 {
    905   dprintf (("SHELL32: StrChrW(%08xh, %08xh)\n",
    906             str,
    907             x));
    908 
    909   return ((LPWSTR)wcschr((const wchar_t*)str,
    910                          x));
    911 }
    912 
    913 
    914 /*****************************************************************************
    915  * Name      : StrChrNIW
    916  * Purpose   :
    917  * Parameters:
    918  * Variables :
    919  * Result    :
    920  * Remark    : SHELL32.?
    921  * Status    : UNTESTED UNKNOWN STUB
    922  *
    923  * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
    924  *****************************************************************************/
    925 
    926 INT WIN32API StrCmpNIW (LPWSTR wstr1,
    927                         LPWSTR wstr2,
    928                         INT    len)
    929 {
    930   dprintf(("SHELL32: StrCmpNIW(%08xh,%08xh,%08xh) not correctly implemented.\n",
    931            wstr1,
    932            wstr2,
    933            len));
    934 
    935   return (wcsncmp((const wchar_t*)wstr1,
    936                   (const wchar_t*)wstr2,
    937                   len));
    938 }
    939 
    940 
    941 /*****************************************************************************
    942  * Name      : DriveType
    943  * Purpose   :
    944  * Parameters:
    945  * Variables :
    946  * Result    :
    947  * Remark    : SHELL32.64
    948  * Status    : UNTESTED UNKNOWN STUB
    949  *
    950  * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
    951  *****************************************************************************/
    952 
    953 HRESULT WIN32API DriveType(DWORD u)
    954 {
    955   dprintf(("SHELL32: DriveType(%08xh) not implemented.\n",
    956            u));
    957 
    958   return 0;
    959 }
    960 
    961 
    962 /*****************************************************************************
    963  * Name      : StrRChrW
    964  * Purpose   :
    965  * Parameters:
    966  * Variables :
    967  * Result    :
    968  * Remark    : SHELL32.320, wcsrchr does not work?
    969  * Status    : UNTESTED UNKNOWN STUB
    970  *
    971  * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
    972  *****************************************************************************/
    973 
    974 LPWSTR WIN32API StrRChrW(LPWSTR lpStart,
    975                          LPWSTR lpEnd,
    976                          DWORD  wMatch)
    977 {
    978   LPWSTR wptr=NULL;
    979 
    980   dprintf(("SHELL32: StrRChrW(%08xh,%08xh,%08xh)\n",
    981            lpStart,
    982            lpEnd,
    983            wMatch));
    984 
    985   /* if the end not given, search*/
    986   if (!lpEnd)
    987   {
    988     lpEnd=lpStart;
    989     while (*lpEnd)
    990       lpEnd++;
    991   }
    992 
    993   do
    994   {
    995     if (*lpStart==(WCHAR)wMatch)
    996       wptr = lpStart;
    997     lpStart++;
    998   }
    999   while ( lpStart<=lpEnd );
    1000   return wptr;
    1001 }
    1002 
    1003 
    1004 /*****************************************************************************
    1005  * Name      : Control_FillCache_RunDLL
    1006  * Purpose   :
    1007  * Parameters:
    1008  * Variables :
    1009  * Result    :
    1010  * Remark    : SHELL32.8
    1011  * Status    : UNTESTED UNKNOWN STUB
    1012  *
    1013  * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
    1014  *****************************************************************************/
    1015 
    1016 HRESULT WIN32API Control_FillCache_RunDLL(HWND   hWnd,
    1017                                           HANDLE hModule,
    1018                                           DWORD  w,
    1019                                           DWORD  x)
    1020 {
    1021   dprintf(("SHELL32: Control_FillCache_RunDLL(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
    1022            hWnd,
    1023            hModule,
    1024            w,
    1025            x));
    1026 
    1027   return 0;
    1028 }
    1029 
    1030 
    1031 /*****************************************************************************
    1032  * Name      : RunDLL_CallEntry16
    1033  * Purpose   :
    1034  * Parameters:
    1035  * Variables :
    1036  * Result    :
    1037  * Remark    : SHELL32.122 - the name is propably wrong
    1038  * Status    : UNTESTED UNKNOWN STUB
    1039  *
    1040  * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
    1041  *****************************************************************************/
    1042 
    1043 HRESULT WIN32API RunDLL_CallEntry16(DWORD v,
    1044                                     DWORD w,
    1045                                     DWORD x,
    1046                                     DWORD y,
    1047                                     DWORD z)
    1048 {
    1049   dprintf(("SHELL32: RunDLL_CallEntry16(%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
    1050            v,
    1051            w,
    1052            x,
    1053            y,
    1054            z));
    1055 
    1056   return 0;
    1057 }
    1058 
    1059251
    1060252/*****************************************************************************
     
    1076268           x,
    1077269           y));
    1078   return 0;
    1079 }
    1080 
    1081 
    1082 /*****************************************************************************
    1083  * Name      : RLBuildListOfPaths
    1084  * Purpose   :
    1085  * Parameters:
    1086  * Variables :
    1087  * Result    :
    1088  * Remark    : SHELL32.146 - builds a DPA
    1089  * Status    : UNTESTED UNKNOWN STUB
    1090  *
    1091  * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
    1092  *****************************************************************************/
    1093 
    1094 DWORD WIN32API RLBuildListOfPaths ()
    1095 {
    1096   dprintf(("SHELL32: RLBuildListOfPaths() not implemented.\n"));
    1097270  return 0;
    1098271}
     
    1128301
    1129302/*****************************************************************************
    1130  * Name      : SetAppStartingCursor
    1131  * Purpose   :
    1132  * Parameters:
    1133  * Variables :
    1134  * Result    :
    1135  * Remark    : SHELL32.99
    1136  * Status    : UNTESTED UNKNOWN STUB
    1137  *
    1138  * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
    1139  *****************************************************************************/
    1140 
    1141 HRESULT WIN32API SetAppStartingCursor(HWND  u,
    1142                                       DWORD v)
    1143 {
    1144   dprintf(("SHELL32: SetAppStartingCursor (SHELL32.99): (%08xh,%08xh) not implemented.\n",
    1145            u,
    1146            v));
    1147 
    1148   return 0;
    1149 }
    1150 
    1151 /*****************************************************************************
    1152303 * Name      : StrCpyNW
    1153304 * Purpose   :
     
    1187338}
    1188339
    1189 /*****************************************************************************
    1190  * Name      : FreeIconList
    1191  * Purpose   :
    1192  * Parameters:
    1193  * Variables :
    1194  * Result    :
    1195  * Remark    : SHELL32.220 - used by progman.exe
    1196  * Status    : UNTESTED UNKNOWN STUB
    1197  *
    1198  * Author    : Christoph Bratschi [Fri, 1999/08/6 19:00]
    1199  *****************************************************************************/
    1200 
    1201 void WIN32API FreeIconList(DWORD dw)
    1202 {
    1203   dprintf(("SHELL32: undoc FreeIconList %08xh\n",dw));
    1204 }
    1205340
    1206341/*****************************************************************************
     
    1294429}
    1295430
    1296 /*****************************************************************************
    1297  * Name      : DoEnvironmentSubstA
    1298  * Purpose   :
    1299  * Parameters: ??? ported WINE 16 bit function
    1300  * Variables :
    1301  * Result    :
    1302  * Remark    : SHELL32.44 - used by progman.exe
    1303  * Status    : UNTESTED UNKNOWN STUB
    1304  *
    1305  * Author    : Christoph Bratschi [Fri, 1999/08/6 19:00]
    1306  *****************************************************************************/
    1307 
    1308 DWORD WIN32API DoEnvironmentSubstA(LPSTR str,DWORD length)
    1309 {
    1310   LPSTR   lpEnv = (LPSTR)GetEnvironmentStringsA();
    1311   LPSTR   lpBuffer = (LPSTR)HeapAlloc( GetProcessHeap(), 0, length);
    1312   LPSTR   lpstr = str;
    1313   LPSTR   lpbstr = lpBuffer;
    1314 
    1315   dprintf(("SHELL32: undoc DoEnvironmentSubstA\n"));
    1316 
    1317   CharToOemA(str,str);
    1318 
    1319   while( *lpstr && lpbstr - lpBuffer < length )
    1320    {
    1321      LPSTR lpend = lpstr;
    1322 
    1323      if( *lpstr == '%' )
    1324        {
    1325           do { lpend++; } while( *lpend && *lpend != '%' );
    1326           if( *lpend == '%' && lpend - lpstr > 1 )      /* found key */
    1327             {
    1328                LPSTR lpKey;
    1329               *lpend = '\0';
    1330                lpKey = SHELL_FindStringA(lpEnv, lpstr+1);
    1331                if( lpKey )                              /* found key value */
    1332                  {
    1333                    int l = strlen(lpKey);
    1334 
    1335                    if( l > length - (lpbstr - lpBuffer) - 1 )
    1336                      {
    1337            //WARN_(shell)("-- Env subst aborted - string too short\n");
    1338                       *lpend = '%';
    1339                        break;
    1340                      }
    1341                    strcpy(lpbstr, lpKey);
    1342                    lpbstr += l;
    1343                  }
    1344                else break;
    1345               *lpend = '%';
    1346                lpstr = lpend + 1;
    1347             }
    1348           else break;                                   /* back off and whine */
    1349 
    1350           continue;
    1351        }
    1352 
    1353      *lpbstr++ = *lpstr++;
    1354    }
    1355 
    1356  *lpbstr = '\0';
    1357   if( lpstr - str == strlen(str) )
    1358     {
    1359       strncpy(str, lpBuffer, length);
    1360       length = 1;
    1361     }
    1362   else
    1363       length = 0;
    1364 
    1365   //TRACE_(shell)("-- return %s\n", str);
    1366 
    1367   OemToCharA(str,str);
    1368   HeapFree( GetProcessHeap(), 0, lpBuffer);
    1369 
    1370   FreeEnvironmentStringsA(lpEnv);
    1371 
    1372   /*  Return str length in the LOWORD
    1373    *  and 1 in HIWORD if subst was successful.
    1374    */
    1375 
    1376  return (DWORD)MAKELONG(strlen(str), length);
    1377 }
    1378 
    1379 /*****************************************************************************
    1380  * Name      : DoEnvironmentSubstW
    1381  * Purpose   :
    1382  * Parameters: ???
    1383  * Variables :
    1384  * Result    :
    1385  * Remark    : SHELL32.193 - used by progman.exe
    1386  * Status    : UNTESTED UNKNOWN STUB
    1387  *
    1388  * Author    : Christoph Bratschi [Fri, 1999/08/6 19:00]
    1389  *****************************************************************************/
    1390 
    1391 DWORD WIN32API DoEnvironmentSubstW(LPWSTR str,DWORD length)
    1392 {
    1393   //CB: call DoEnvironmentSubstW
    1394   dprintf(("SHELL32: undoc DoEnvironmentSubstW\n"));
     431
     432/*****************************************************************************
     433 * Name      : CheckEscapesA
     434 * Purpose   :
     435 * Parameters: ???
     436 * Variables :
     437 * Result    :
     438 * Remark    : SHELL32.3 - used by progman.exe
     439 * Status    : UNTESTED UNKNOWN STUB
     440 *
     441 * Author    : Christoph Bratschi [Fri, 1999/08/6 19:00]
     442 *****************************************************************************/
     443
     444void WIN32API CheckEscapesA(DWORD x1,DWORD x2)
     445{
     446  dprintf(("SHELL32: undoc CheckEscapesA\n"));
     447}
     448
     449/*****************************************************************************
     450 * Name      : CheckEscapesW
     451 * Purpose   :
     452 * Parameters: ???
     453 * Variables :
     454 * Result    :
     455 * Remark    : SHELL32.6 - used by progman.exe
     456 * Status    : UNTESTED UNKNOWN STUB
     457 *
     458 * Author    : Christoph Bratschi [Fri, 1999/08/6 19:00]
     459 *****************************************************************************/
     460
     461void WIN32API CheckEscapesW(DWORD x1,DWORD x2)
     462{
     463  dprintf(("SHELL32: undoc CheckEscapesW\n"));
     464}
     465
     466/*****************************************************************************
     467 * Name      : DuplicateIcon
     468 * Purpose   :
     469 * Parameters: ???
     470 * Variables :
     471 * Result    :
     472 * Remark    : SHELL32.138 - used by progman.exe
     473 * Status    : UNTESTED UNKNOWN STUB
     474 *
     475 * Author    : Christoph Bratschi [Fri, 1999/08/6 19:00]
     476 *****************************************************************************/
     477
     478DWORD WIN32API DuplicateIcon(DWORD x1)
     479{
     480  dprintf(("SHELL32: undoc DuplicateIcon\n"));
    1395481
    1396482  return 0;
    1397483}
    1398 
    1399 /*****************************************************************************
    1400  * Name      : CheckEscapesA
    1401  * Purpose   :
    1402  * Parameters: ???
    1403  * Variables :
    1404  * Result    :
    1405  * Remark    : SHELL32.3 - used by progman.exe
    1406  * Status    : UNTESTED UNKNOWN STUB
    1407  *
    1408  * Author    : Christoph Bratschi [Fri, 1999/08/6 19:00]
    1409  *****************************************************************************/
    1410 
    1411 void WIN32API CheckEscapesA(DWORD x1,DWORD x2)
    1412 {
    1413   dprintf(("SHELL32: undoc CheckEscapesA\n"));
    1414 }
    1415 
    1416 /*****************************************************************************
    1417  * Name      : CheckEscapesW
    1418  * Purpose   :
    1419  * Parameters: ???
    1420  * Variables :
    1421  * Result    :
    1422  * Remark    : SHELL32.6 - used by progman.exe
    1423  * Status    : UNTESTED UNKNOWN STUB
    1424  *
    1425  * Author    : Christoph Bratschi [Fri, 1999/08/6 19:00]
    1426  *****************************************************************************/
    1427 
    1428 void WIN32API CheckEscapesW(DWORD x1,DWORD x2)
    1429 {
    1430   dprintf(("SHELL32: undoc CheckEscapesW\n"));
    1431 }
    1432 
    1433 /*****************************************************************************
    1434  * Name      : DuplicateIcon
    1435  * Purpose   :
    1436  * Parameters: ???
    1437  * Variables :
    1438  * Result    :
    1439  * Remark    : SHELL32.138 - used by progman.exe
    1440  * Status    : UNTESTED UNKNOWN STUB
    1441  *
    1442  * Author    : Christoph Bratschi [Fri, 1999/08/6 19:00]
    1443  *****************************************************************************/
    1444 
    1445 DWORD WIN32API DuplicateIcon(DWORD x1)
    1446 {
    1447   dprintf(("SHELL32: undoc DuplicateIcon\n"));
    1448 
    1449   return 0;
    1450 }
Note: See TracChangeset for help on using the changeset viewer.