Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8184769

Static Link to SHGetKnownFolderPath

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 10
    • None
    • deploy

    Description

      Fix the following code:

      + HMODULE hndlShell32;
      + lpSHGetKnownFolderPath pSHGetKnownFolderPath;
      + TString tmpDir;
      +
      + hndlShell32 = ::LoadLibrary(L"shell32");
      + if (NULL != hndlShell32) {
      +
      + pSHGetKnownFolderPath = (lpSHGetKnownFolderPath)
      + GetProcAddress(hndlShell32, "SHGetKnownFolderPath");
      +
      + if (pSHGetKnownFolderPath != NULL) {
      + PWSTR userDir = 0;
      + if (SUCCEEDED(pSHGetKnownFolderPath(
      + FOLDERID_Profile,
      + 0,
      + NULL,
      + &userDir))) {
      + tmpDir = userDir;
      + tmpDir += WINDOWS_PACKAGER_TMP_DIR;
      + CoTaskMemFree(userDir);
      + }
      + }
      + FreeLibrary(hndlShell32);
      + }
      + return tmpDir;
      +}

      Attachments

        Activity

          People

            cbensen Chris Bensen (Inactive)
            cbensen Chris Bensen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: