pastebin - collaborative debugging tool
nrubsig.kpaste.net RSS


NPFormatNetworkName() prototype
Posted by Anonymous on Mon 9th Dec 2024 15:20
raw | new post

  1. diff --git a/dll/nfs41_np.c b/dll/nfs41_np.c
  2. index cb1148c..ee6b222 100644
  3. --- a/dll/nfs41_np.c
  4. +++ b/dll/nfs41_np.c
  5. @@ -458,8 +458,10 @@ NPGetCaps(
  6.          case WNNC_START:
  7.              rc = 1;
  8.              break;
  9. -        case WNNC_USER:
  10.          case WNNC_DIALOG:
  11. +            rc = WNNC_DLG_FORMATNETWORKNAME;
  12. +            break;
  13. +        case WNNC_USER:
  14.          case WNNC_ADMIN:
  15.          case WNNC_CONNECTION_FLAGS:
  16.          default:
  17. @@ -1368,3 +1370,32 @@ NPGetUniversalName(
  18.          lpLocalPath, (int)dwInfoLevel));
  19.      return WN_NOT_SUPPORTED;
  20.  }
  21. +
  22. +DWORD APIENTRY
  23. +NPFormatNetworkName(
  24. +    _In_    LPWSTR      lpRemoteName,
  25. +    _Out_writes_(*lpnLength) LPWSTR lpFormattedName,
  26. +    _Inout_ LPDWORD     lpnLength,
  27. +    _In_    DWORD       dwFlags,
  28. +    _In_    DWORD       dwAveCharPerLine
  29. +)
  30. +{
  31. +    DWORD   Status = WN_SUCCESS;
  32. +    DbgP((L"--> NPFormatNetworkName(lpRemoteName='%s', "
  33. +        "*lpnLength='%d', dwFlags=0x%x, "
  34. +        "dwAveCharPerLine=%d\n",
  35. +        lpRemoteName, (int)*lpnLength,
  36. +        (int)dwFlags, (int)dwAveCharPerLine));
  37. +
  38. +    if (*lpnLength < 1024) {
  39. +        *lpnLength = 1024;
  40. +        Status = WN_MORE_DATA;
  41. +        goto out;
  42. +    }
  43. +
  44. +    (void)swprintf(lpFormattedName, 1024, L"nfs://%ls?done", lpRemoteName);
  45. +out:
  46. +    DbgP((L"<-- NPFormatNetworkName returns %d\n", (int)Status));
  47. +    return Status;
  48. +}
  49. +
  50. diff --git a/dll/nfs41_np.def b/dll/nfs41_np.def
  51. index 8ac37a9..2174d69 100644
  52. --- a/dll/nfs41_np.def
  53. +++ b/dll/nfs41_np.def
  54. @@ -11,6 +11,7 @@ EXPORTS
  55.         NPEnumResource
  56.         NPCloseEnum
  57.         NPGetUniversalName
  58. +       NPFormatNetworkName
  59.         NPGetResourceParent
  60.         NPGetResourceInformation
  61.         NPLogonNotify

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}




All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at