Changeset 2144 for trunk/src


Ignore:
Timestamp:
Dec 19, 1999, 8:54:32 PM (26 years ago)
Author:
sandervl
Message:

FindResourceExA/W implemented, CreateProcessW bugfix

Location:
trunk/src/kernel32
Files:
4 edited

Legend:

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

    r1885 r2144  
    1 /* $Id: resource.cpp,v 1.12 1999-11-30 14:15:54 sandervl Exp $ */
     1/* $Id: resource.cpp,v 1.13 1999-12-19 19:54:30 sandervl Exp $ */
    22
    33/*
     
    4747
    4848    return module->findResourceW((LPWSTR)lpszName, (LPWSTR)lpszType);
     49}
     50/*****************************************************************************
     51 * Name      : HRSRC WIN32API FindResourceExA
     52 * Purpose   : The FindResourceExA function determines the location of the
     53 *             resource with the specified type, name, and language in the
     54 *             specified module.
     55 * Parameters: HMODULE hModule  resource-module handle
     56 *             LPCSTR lpType    pointer to resource type
     57 *             LPCSTR lpName    pointer to resource name
     58 *             WORD wLanguage   resource language
     59 * Variables :
     60 * Result    : If the function succeeds, the return value is a handle to the
     61 *             specified resource's info block. To obtain a handle to the
     62 *             resource, pass this handle to the LoadResource function.
     63 *             If the function fails, the return value is NULL
     64 * Remark    :
     65 * Status    : UNTESTED STUB
     66 *
     67 * Author    : SvL
     68 *****************************************************************************/
     69
     70HRSRC  WIN32API FindResourceExA( HMODULE hModule, LPCSTR lpType,
     71                                    LPCSTR lpName, WORD wLanguage)
     72{
     73 Win32ImageBase *module;
     74
     75    module = Win32ImageBase::findModule(hModule);
     76    if(module == NULL) {
     77          dprintf(("FindResourceExA Module %X not found (%x %d)", hModule, lpName, lpType));
     78          return(NULL);
     79    }
     80
     81    return module->findResourceA((LPSTR)lpName, (LPSTR)lpType, wLanguage);
     82}
     83
     84/*****************************************************************************
     85 * Name      : HRSRC WIN32API FindResourceExA
     86 * Purpose   : The FindResourceExA function determines the location of the
     87 *             resource with the specified type, name, and language in the
     88 *             specified module.
     89 * Parameters: HMODULE hModule  resource-module handle
     90 *             LPCSTR lpType    pointer to resource type
     91 *             LPCSTR lpName    pointer to resource name
     92 *             WORD wLanguage   resource language
     93 * Variables :
     94 * Result    : If the function succeeds, the return value is a handle to the
     95 *             specified resource's info block. To obtain a handle to the
     96 *             resource, pass this handle to the LoadResource function.
     97 *             If the function fails, the return value is NULL
     98 * Remark    :
     99 * Status    : UNTESTED STUB
     100 *
     101 * Author    : SvL
     102 *****************************************************************************/
     103
     104HRSRC  WIN32API FindResourceExW(HMODULE hModule,
     105                                LPCWSTR lpType,
     106                                LPCWSTR lpName,
     107                                WORD    wLanguage)
     108{
     109 Win32ImageBase *module;
     110
     111    module = Win32ImageBase::findModule(hModule);
     112    if(module == NULL) {
     113          dprintf(("FindResourceExW Module %X not found (%x %d)", hModule, lpName, lpType));
     114          return(NULL);
     115    }
     116
     117    return module->findResourceW((LPWSTR)lpName, (LPWSTR)lpType, wLanguage);
    49118}
    50119//******************************************************************************
  • trunk/src/kernel32/stubs.cpp

    r2115 r2144  
    1 /* $Id: stubs.cpp,v 1.14 1999-12-18 17:17:55 sandervl Exp $ */
     1/* $Id: stubs.cpp,v 1.15 1999-12-19 19:54:31 sandervl Exp $ */
    22
    33/*
     
    16691669
    16701670/*****************************************************************************
    1671  * Name      : HRSRC WIN32API FindResourceExA
    1672  * Purpose   : The FindResourceExA function determines the location of the
    1673  *             resource with the specified type, name, and language in the
    1674  *             specified module.
    1675  * Parameters: HMODULE hModule  resource-module handle
    1676  *             LPCSTR lpType    pointer to resource type
    1677  *             LPCSTR lpName    pointer to resource name
    1678  *             WORD wLanguage   resource language
    1679  * Variables :
    1680  * Result    : If the function succeeds, the return value is a handle to the
    1681  *             specified resource's info block. To obtain a handle to the
    1682  *             resource, pass this handle to the LoadResource function.
    1683  *             If the function fails, the return value is NULL
    1684  * Remark    :
    1685  * Status    : UNTESTED STUB
    1686  *
    1687  * Author    : Markus Montkowski [Tha, 1998/05/21 20:57]
    1688  *****************************************************************************/
    1689 
    1690 HRSRC  WIN32API FindResourceExA( HMODULE hModule, LPCSTR lpType,
    1691                                     LPCSTR lpName, WORD wLanguage)
    1692 {
    1693 
    1694   dprintf(("KERNEL32:  FindResourceExA(%08x,%08x,%08x,%08x) not implemented\n",
    1695             hModule, lpType, lpName, wLanguage
    1696           ));
    1697 
    1698   return (NULL);
    1699 }
    1700 
    1701 /*****************************************************************************
    1702  * Name      : HRSRC WIN32API FindResourceExA
    1703  * Purpose   : The FindResourceExA function determines the location of the
    1704  *             resource with the specified type, name, and language in the
    1705  *             specified module.
    1706  * Parameters: HMODULE hModule  resource-module handle
    1707  *             LPCSTR lpType    pointer to resource type
    1708  *             LPCSTR lpName    pointer to resource name
    1709  *             WORD wLanguage   resource language
    1710  * Variables :
    1711  * Result    : If the function succeeds, the return value is a handle to the
    1712  *             specified resource's info block. To obtain a handle to the
    1713  *             resource, pass this handle to the LoadResource function.
    1714  *             If the function fails, the return value is NULL
    1715  * Remark    :
    1716  * Status    : UNTESTED STUB
    1717  *
    1718  * Author    : Markus Montkowski [Tha, 1998/05/21 20:57]
    1719  *****************************************************************************/
    1720 
    1721 HRSRC  WIN32API FindResourceExW(HMODULE hModule,
    1722                                    LPCWSTR lpType,
    1723                                    LPCWSTR lpName,
    1724                                    WORD    wLanguage)
    1725 {
    1726 
    1727   dprintf(("KERNEL32:  FindResourceExW(%08x,%08x,%08x,%08x) not implemented\n",
    1728             hModule, lpType, lpName, wLanguage
    1729           ));
    1730 
    1731   return (NULL);
    1732 }
    1733 
    1734 
    1735 /*****************************************************************************
    17361671 * Name      : int WIN32API FoldStringA
    17371672 * Purpose   : The FoldStringW function maps one string to another, performing
  • trunk/src/kernel32/winimgres.cpp

    r1885 r2144  
    1 /* $Id: winimgres.cpp,v 1.29 1999-11-30 14:15:55 sandervl Exp $ */
     1/* $Id: winimgres.cpp,v 1.30 1999-12-19 19:54:31 sandervl Exp $ */
    22
    33/*
     
    296296    else    astring2 = (char *)lpszType;
    297297
    298     hres = (HRSRC) findResourceA(astring1, astring2);
     298    hres = (HRSRC) findResourceA(astring1, astring2, lang);
    299299
    300300    if(HIWORD(astring1)) FreeAsciiString(astring1);
  • trunk/src/kernel32/wprocess.cpp

    r2096 r2144  
    1 /* $Id: wprocess.cpp,v 1.60 1999-12-17 16:56:30 sandervl Exp $ */
     1/* $Id: wprocess.cpp,v 1.61 1999-12-19 19:54:32 sandervl Exp $ */
    22
    33/*
     
    744744//******************************************************************************
    745745//******************************************************************************
    746 BOOL WIN32API CreateProcessW(LPCWSTR arg1, LPWSTR arg2,
    747                              PSECURITY_ATTRIBUTES arg3,
    748                              PSECURITY_ATTRIBUTES arg4,
    749                              BOOL arg5, DWORD arg6, PVOID arg7,
    750                              LPCWSTR arg8, LPSTARTUPINFOW arg9,
    751                              LPPROCESS_INFORMATION  arg10)
     746BOOL WIN32API CreateProcessW(LPCWSTR lpApplicationName, LPWSTR lpCommandLine,
     747                             PSECURITY_ATTRIBUTES lpProcessAttributes,
     748                             PSECURITY_ATTRIBUTES lpThreadAttributes,
     749                             BOOL bInheritHandles, DWORD dwCreationFlags,
     750                             LPVOID lpEnvironment,
     751                             LPCWSTR lpCurrentDirectory, LPSTARTUPINFOW lpStartupInfo,
     752                             LPPROCESS_INFORMATION lpProcessInfo)
    752753{
    753754 BOOL rc;
    754  char *astring1, *astring2, *astring3;
    755 
    756     dprintf(("KERNEL32:  OS2CreateProcessW DOESN't WORK"));
    757     astring1 = UnicodeToAsciiString((LPWSTR)arg1);
    758     astring2 = UnicodeToAsciiString(arg2);
    759     astring3 = UnicodeToAsciiString((LPWSTR)arg8);
    760     rc = CreateProcessA(astring1, astring2, arg3, arg4, arg5, arg6, arg7,
    761                            astring3, (LPSTARTUPINFOA)arg9, arg10);
    762     FreeAsciiString(astring3);
    763     FreeAsciiString(astring2);
    764     FreeAsciiString(astring1);
     755 char *astring1 = 0, *astring2 = 0, *astring3 = 0;
     756
     757    dprintf(("KERNEL32: CreateProcessW"));
     758    if(lpApplicationName)
     759        astring1 = UnicodeToAsciiString((LPWSTR)lpApplicationName);
     760    if(lpCommandLine)
     761        astring2 = UnicodeToAsciiString(lpCommandLine);
     762    if(lpCurrentDirectory)
     763        astring3 = UnicodeToAsciiString((LPWSTR)lpCurrentDirectory);
     764    rc = CreateProcessA(astring1, astring2, lpProcessAttributes, lpThreadAttributes,
     765                        bInheritHandles, dwCreationFlags, lpEnvironment,
     766                        astring3, (LPSTARTUPINFOA)lpStartupInfo,
     767                        lpProcessInfo);
     768    if(astring3)        FreeAsciiString(astring3);
     769    if(astring2)        FreeAsciiString(astring2);
     770    if(astring1)        FreeAsciiString(astring1);
    765771    return(rc);
    766772}
Note: See TracChangeset for help on using the changeset viewer.