Click here to Skip to main content
15,920,468 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionVS2005 & VS2008 DLL Compilation issues Pin
masnu10-Mar-10 7:56
masnu10-Mar-10 7:56 
AnswerRe: VS2005 & VS2008 DLL Compilation issues Pin
CPallini10-Mar-10 8:01
mveCPallini10-Mar-10 8:01 
GeneralRe: VS2005 & VS2008 DLL Compilation issues Pin
masnu10-Mar-10 9:19
masnu10-Mar-10 9:19 
QuestionRe: VS2005 & VS2008 DLL Compilation issues Pin
CPallini10-Mar-10 10:24
mveCPallini10-Mar-10 10:24 
AnswerRe: VS2005 & VS2008 DLL Compilation issues Pin
Chris Losinger10-Mar-10 8:13
professionalChris Losinger10-Mar-10 8:13 
GeneralRe: VS2005 & VS2008 DLL Compilation issues Pin
masnu10-Mar-10 9:21
masnu10-Mar-10 9:21 
QuestionAdministration Rights for my Application by Token Pin
Joschwenk66610-Mar-10 2:58
Joschwenk66610-Mar-10 2:58 
AnswerRe: Administration Rights for my Application by Token Pin
Eugen Podsypalnikov10-Mar-10 3:17
Eugen Podsypalnikov10-Mar-10 3:17 
Try it Smile | :)
However, I hold it in a service code, that is started by SYSTEM user...
(Die Funktion aktiviert eine existierende Begünstigung,
verteilt aber nichts, wenn diese für den Benutzer nicht vorhanden ist)

BOOL AdjustTokenPrivileges(LPCTSTR lpName)
{
  BOOL bRes = TRUE;

  HANDLE hToken;
  if (OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES, &hToken)) {
    LUID luid;
    if (LookupPrivilegeValue(NULL, lpName, &luid)) {
      TOKEN_PRIVILEGES tp;
      tp.PrivilegeCount = 1;
      tp.Privileges[0].Luid = luid;
      tp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;

      if (!::AdjustTokenPrivileges(hToken, FALSE, &tp, sizeof(TOKEN_PRIVILEGES), NULL, NULL)) {
        bRes = FALSE;
      }
    } else {
      bRes = FALSE;
    }
    CloseHandle(hToken);
  } else {
    bRes = FALSE;
  }

  return bRes;
}
 
void Usage()
{
  AdjustTokenPrivileges(SE_RESTORE_NAME);
  AdjustTokenPrivileges(SE_BACKUP_NAME);
...
}
virtual void BeHappy() = 0;

QuestionWM_GETFONT returns NULL Pin
sashoalm10-Mar-10 1:53
sashoalm10-Mar-10 1:53 
AnswerRe: WM_GETFONT returns NULL Pin
Steve Thresher10-Mar-10 2:24
Steve Thresher10-Mar-10 2:24 
GeneralRe: WM_GETFONT returns NULL Pin
sashoalm10-Mar-10 2:50
sashoalm10-Mar-10 2:50 
QuestionHTML Editing Control for Win32 Pin
Steve Thresher10-Mar-10 0:08
Steve Thresher10-Mar-10 0:08 
AnswerRe: HTML Editing Control for Win32 Pin
KingsGambit10-Mar-10 0:37
KingsGambit10-Mar-10 0:37 
GeneralRe: HTML Editing Control for Win32 Pin
Steve Thresher10-Mar-10 1:07
Steve Thresher10-Mar-10 1:07 
GeneralRe: HTML Editing Control for Win32 Pin
KingsGambit10-Mar-10 7:28
KingsGambit10-Mar-10 7:28 
AnswerRe: HTML Editing Control for Win32 Pin
cmk10-Mar-10 7:32
cmk10-Mar-10 7:32 
QuestionAdding sub-menu items to visio object Pin
coder21k10-Mar-10 0:03
coder21k10-Mar-10 0:03 
QuestionNo Method for Changing CMFCRibbonPanel Control Name Dynamically Pin
A&Ms9-Mar-10 23:31
A&Ms9-Mar-10 23:31 
AnswerRe: No Method for Changing CMFCRibbonPanel Control Name Dynamically Pin
Eugen Podsypalnikov9-Mar-10 23:46
Eugen Podsypalnikov9-Mar-10 23:46 
GeneralRe: No Method for Changing CMFCRibbonPanel Control Name Dynamically Pin
A&Ms10-Mar-10 0:02
A&Ms10-Mar-10 0:02 
Questionproblem on resize and move dialog window Pin
shiv@nand9-Mar-10 23:26
shiv@nand9-Mar-10 23:26 
AnswerRe: problem on resize and move dialog window Pin
Eugen Podsypalnikov9-Mar-10 23:48
Eugen Podsypalnikov9-Mar-10 23:48 
AnswerRe: problem on resize and move dialog window Pin
R@jeev K R10-Mar-10 1:25
R@jeev K R10-Mar-10 1:25 
AnswerRe: problem on resize and move dialog window Pin
Mohan Ramachandra10-Mar-10 1:28
Mohan Ramachandra10-Mar-10 1:28 
GeneralRe: problem on resize and move dialog window Pin
shiv@nand10-Mar-10 1:29
shiv@nand10-Mar-10 1:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.