[SHELL32][SDK] Implement SHStartNetConnectionDialogA (#5847)

and add SHStartNetConnectionDialog prototype to <shlobj.h>.
This commit is contained in:
Katayama Hirofumi MZ 2023-10-28 22:29:05 +09:00 committed by GitHub
parent a52c713755
commit 128e7f5aea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 48 additions and 16 deletions

View file

@ -604,3 +604,29 @@ Activate_RunDLL(
GetWindowThreadProcessId(GetShellWindow(), &dwProcessID);
return AllowSetForegroundWindow(dwProcessID);
}
/*************************************************************************
* SHStartNetConnectionDialogA (SHELL32.12)
*
* @see https://learn.microsoft.com/en-us/windows/win32/api/shlobj_core/nf-shlobj_core-shstartnetconnectiondialoga
*/
EXTERN_C
HRESULT WINAPI
SHStartNetConnectionDialogA(
_In_ HWND hwnd,
_In_ LPCSTR pszRemoteName,
_In_ DWORD dwType)
{
LPCWSTR pszRemoteNameW = NULL;
CStringW strRemoteNameW;
TRACE("(%p, %s, %lu)\n", hwnd, debugstr_a(pszRemoteName), dwType);
if (pszRemoteName)
{
strRemoteNameW = pszRemoteName;
pszRemoteNameW = strRemoteNameW;
}
return SHStartNetConnectionDialogW(hwnd, pszRemoteNameW, dwType);
}