VirtualBox

Changeset 42149 in vbox


Ignore:
Timestamp:
Jul 13, 2012 3:22:03 PM (12 years ago)
Author:
vboxsync
Message:

Drop the TCHAR charade and make it build against current sdk. :-)

Location:
trunk/src/VBox/Additions/common/VBoxService/testcase
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxService/testcase/Makefile.kmk

    r41477 r42149  
    2828#
    2929tstUserInfo_TEMPLATE    = VBOXGUESTR3EXE
    30 tstUserInfo_DEFS.win    = _WIN32_WINNT=0x0400 _UNICODE UNICODE
    3130tstUserInfo_SOURCES     = \
    3231        tstUserInfo.cpp
  • trunk/src/VBox/Additions/common/VBoxService/testcase/tstUserInfo.cpp

    r38636 r42149  
    2121*******************************************************************************/
    2222#ifdef RT_OS_WINDOWS
    23 # include <windows.h>
    24 # include <tchar.h>
     23# include <Windows.h>
    2524# include <stdio.h>
    2625# include <Shlobj.h>
     
    5049    }
    5150#ifdef RT_OS_WINDOWS
    52     TCHAR szPath[MAX_PATH];
    53     HRESULT hRes = SHGetFolderPath(0, CSIDL_APPDATA, 0, 0, szPath);
     51    WCHAR   wszPath[MAX_PATH];
     52    HRESULT hRes = SHGetFolderPathW(0, CSIDL_APPDATA, 0, 0, wszPath);
    5453
    5554    if (SUCCEEDED(hRes))
    5655    {
    57         RTPrintf("SHGetFolderPathW (CSIDL_APPDATA) = %ls\n", szPath);
    58         hRes = SHGetFolderPath(0, CSIDL_PERSONAL, 0, 0, szPath);
     56        RTPrintf("SHGetFolderPathW (CSIDL_APPDATA) = %ls\n", wszPath);
     57        hRes = SHGetFolderPathW(0, CSIDL_PERSONAL, 0, 0, wszPath);
    5958        if (SUCCEEDED(hRes))
    6059        {
    61             RTPrintf("SHGetFolderPathW (CSIDL_PERSONAL) = %ls\n", szPath);
     60            RTPrintf("SHGetFolderPathW (CSIDL_PERSONAL) = %ls\n", wszPath);
    6261        }
    6362        else
     
    7473    RTPrintf("APPDATA = %s\n", getenv("APPDATA"));
    7574#endif
    76     return RT_SUCCESS(rc) ? 0 : 1;
     75    return RT_SUCCESS(rc) ? RTEXITCODE_SUCCESS : RTEXITCODE_FAILURE;
    7776}
    7877
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette