--- mstools/samples/ddeml/server/dialog.c 2018/08/09 18:21:27 1.1.1.2 +++ mstools/samples/ddeml/server/dialog.c 2018/08/09 18:23:24 1.1.1.3 @@ -1,3 +1,14 @@ + +/******************************************************************************\ +* This is a part of the Microsoft Source Code Samples. +* Copyright (C) 1993 Microsoft Corporation. +* All rights reserved. +* This source code is only intended as a supplement to +* Microsoft Development Tools and/or WinHelp documentation. +* See these sources for detailed information regarding the +* Microsoft samples programs. +\******************************************************************************/ + #include #include #include "server.h" @@ -201,7 +212,7 @@ LPARAM lParam) BOOL APIENTRY ContextDlgProc( -HWND hwnd, +HWND hwnd, register UINT msg, register WPARAM wParam, LPARAM lParam) @@ -215,6 +226,8 @@ LPARAM lParam) SetDlgItemInt(hwnd, IDEF_CODEPAGE, CCFilter.iCodePage, TRUE); SetDlgItemInt(hwnd, IDEF_LANG, LOWORD(CCFilter.dwLangID), FALSE); SetDlgItemInt(hwnd, IDEF_SECURITY, LOWORD(CCFilter.dwSecurity), FALSE); + CheckRadioButton(hwnd, IDRB_IL_ANON, IDRB_IL_DELEGATE, + IDRB_IL_ANON + (int)CCFilter.qos.ImpersonationLevel); return(1); break; @@ -232,6 +245,16 @@ LPARAM lParam) CCFilter.dwSecurity = (DWORD)GetDlgItemInt(hwnd, IDEF_SECURITY, &fSuccess, FALSE); if (!fSuccess) return(0); + if (IsDlgButtonChecked(hwnd, IDRB_IL_ANON)) { + CCFilter.qos.ImpersonationLevel = SecurityAnonymous; + } else if (IsDlgButtonChecked(hwnd, IDRB_IL_ID)) { + CCFilter.qos.ImpersonationLevel = SecurityIdentification; + } else if (IsDlgButtonChecked(hwnd, IDRB_IL_IMP)) { + CCFilter.qos.ImpersonationLevel = SecurityImpersonation; + } else if (IsDlgButtonChecked(hwnd, IDRB_IL_DELEGATE)) { + CCFilter.qos.ImpersonationLevel = SecurityDelegation; + } + // fall through case IDCANCEL: EndDialog(hwnd, 0);