Click here to Skip to main content
15,888,300 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: A Problem in Writing Shared Memory to windows from a C++ application Pin
Richard Andrew x643-Aug-18 13:44
professionalRichard Andrew x643-Aug-18 13:44 
GeneralRe: A Problem in Writing Shared Memory to windows from a C++ application Pin
D_code_writer3-Aug-18 14:05
D_code_writer3-Aug-18 14:05 
QuestionCEditCtrl in FrameWnd Pin
john56321-Aug-18 23:50
john56321-Aug-18 23:50 
AnswerRe: CEditCtrl in FrameWnd Pin
Richard MacCutchan2-Aug-18 0:35
mveRichard MacCutchan2-Aug-18 0:35 
AnswerRe: CEditCtrl in FrameWnd Pin
Jochen Arndt2-Aug-18 0:51
professionalJochen Arndt2-Aug-18 0:51 
AnswerRe: CEditCtrl in FrameWnd Pin
Victor Nijegorodov2-Aug-18 1:01
Victor Nijegorodov2-Aug-18 1:01 
QuestionRun CFile::Open as admin Pin
_Flaviu1-Aug-18 21:47
_Flaviu1-Aug-18 21:47 
AnswerRe: Run CFile::Open as admin Pin
Jochen Arndt1-Aug-18 22:54
professionalJochen Arndt1-Aug-18 22:54 
There is no way. A running process can not get higher privileges.

All you can do is starting another process using ShellExecuteEx with the "runas" verb which usually shows the UAC prompt.

Another option is running your application with sufficient priviliges and drop those when no longer needed. See permissions - Dropping privileges in C++ on Windows - Stack Overflow[^].

See also the CP article Riding the Vista UAC elevator, up and down[^].

But I suggest to rethink your request. An application should not modify data in the Program Files directory tree. That should be only modified by installation and update processes. Windows provides common directories for application specific data (shared and per user).
GeneralRe: Run CFile::Open as admin Pin
_Flaviu1-Aug-18 23:00
_Flaviu1-Aug-18 23:00 
Questionexecl in c++ example Pin
Shaul.amir30-Jul-18 22:12
Shaul.amir30-Jul-18 22:12 
AnswerRe: execl in c++ example Pin
Jochen Arndt30-Jul-18 23:02
professionalJochen Arndt30-Jul-18 23:02 
Questionhelp me~ for use..... #define macro ## #@ # Pin
dsyoon ds29-Jul-18 17:00
dsyoon ds29-Jul-18 17:00 
AnswerRe: help me~ for use..... #define macro ## #@ # Pin
Daniel Pfeffer29-Jul-18 20:45
professionalDaniel Pfeffer29-Jul-18 20:45 
QuestionThe new upgrade system Pin
Anthony Appleyard28-Jul-18 12:50
Anthony Appleyard28-Jul-18 12:50 
AnswerRe: The new upgrade system Pin
Anthony Appleyard28-Jul-18 18:35
Anthony Appleyard28-Jul-18 18:35 
GeneralRe: The new upgrade system Pin
Richard MacCutchan28-Jul-18 22:20
mveRichard MacCutchan28-Jul-18 22:20 
AnswerRe: The new upgrade system Pin
Victor Nijegorodov28-Jul-18 21:22
Victor Nijegorodov28-Jul-18 21:22 
GeneralRe: The new upgrade system Pin
Anthony Appleyard28-Jul-18 23:39
Anthony Appleyard28-Jul-18 23:39 
GeneralRe: The new upgrade system Pin
Richard MacCutchan28-Jul-18 23:41
mveRichard MacCutchan28-Jul-18 23:41 
GeneralRe: The new upgrade system Pin
Anthony Appleyard28-Jul-18 23:39
Anthony Appleyard28-Jul-18 23:39 
GeneralRe: The new upgrade system Pin
Richard MacCutchan28-Jul-18 23:42
mveRichard MacCutchan28-Jul-18 23:42 
GeneralRe: The new upgrade system Pin
Anthony Appleyard29-Jul-18 0:39
Anthony Appleyard29-Jul-18 0:39 
GeneralRe: The new upgrade system Pin
Richard MacCutchan29-Jul-18 0:50
mveRichard MacCutchan29-Jul-18 0:50 
GeneralRe: The new upgrade system Pin
Anthony Appleyard29-Jul-18 18:20
Anthony Appleyard29-Jul-18 18:20 
GeneralRe: The new upgrade system Pin
Richard MacCutchan29-Jul-18 21:13
mveRichard MacCutchan29-Jul-18 21:13 

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.