Click here to Skip to main content
15,886,362 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: how to delete cstring from specific index Pin
Larry Mills Sr12-Apr-09 9:48
Larry Mills Sr12-Apr-09 9:48 
GeneralRe: how to delete cstring from specific index Pin
Aljaz11112-Apr-09 10:00
Aljaz11112-Apr-09 10:00 
GeneralRe: how to delete cstring from specific index Pin
Aljaz11112-Apr-09 10:04
Aljaz11112-Apr-09 10:04 
GeneralRe: how to delete cstring from specific index Pin
«_Superman_»12-Apr-09 18:40
professional«_Superman_»12-Apr-09 18:40 
QuestionRe: how to delete cstring from specific index Pin
David Crow13-Apr-09 3:44
David Crow13-Apr-09 3:44 
QuestionToo FEW Arguments in BOOL? Pin
rbwest8611-Apr-09 21:56
rbwest8611-Apr-09 21:56 
AnswerRe: Too FEW Arguments in BOOL? Pin
David Crow13-Apr-09 3:41
David Crow13-Apr-09 3:41 
AnswerRe: Too FEW Arguments in BOOL? Pin
rbwest8614-Apr-09 1:59
rbwest8614-Apr-09 1:59 
I am sorry for the confusion. Here is the code which needs clarification. I am trying to figure out how to relay the BOOL Function to a string, so I can then cout << string << endl;

Here is the code:

<code>BOOL SetPrivilege(
HANDLE hToken, // access token handle
LPCTSTR lpszPrivilege, // name of privilege to enable/disable
BOOL bEnablePrivilege // to enable or disable privilege
)
{
TOKEN_PRIVILEGES tp;
LUID luid;

if ( !LookupPrivilegeValue(
NULL, // lookup privilege on local system
lpszPrivilege, // privilege to lookup
&luid ) ) // receives LUID of privilege
{
printf("LookupPrivilegeValue error: %u\n", GetLastError() );
return FALSE;
}

tp.PrivilegeCount = 1;
tp.Privileges[0].Luid = luid;
if (bEnablePrivilege)
tp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
else
tp.Privileges[0].Attributes = 0;

// Enable the privilege or disable all privileges.

if ( !AdjustTokenPrivileges(
hToken,
FALSE,
&tp,
sizeof(TOKEN_PRIVILEGES),
(PTOKEN_PRIVILEGES) NULL,
(PDWORD) NULL) )
{
printf("AdjustTokenPrivileges error: %u\n", GetLastError() );
return FALSE;
}

if (GetLastError() == ERROR_NOT_ALL_ASSIGNED)

{
printf("The token does not have the specified privilege. \n");
return FALSE;
}

return TRUE;
}

Thank you once again for helping me with this.
QuestionC++ FFT subroutine Pin
mrby12311-Apr-09 20:49
mrby12311-Apr-09 20:49 
AnswerRe: C++ FFT subroutine Pin
CPallini11-Apr-09 22:40
mveCPallini11-Apr-09 22:40 
Questioncan someone explain to a newby what the top line argument call. Pin
johnathan warfield11-Apr-09 19:53
johnathan warfield11-Apr-09 19:53 
AnswerRe: can someone explain to a newby what the top line argument call. Pin
«_Superman_»11-Apr-09 20:54
professional«_Superman_»11-Apr-09 20:54 
AnswerRe: can someone explain to a newby what the top line argument call. Pin
David Crow13-Apr-09 3:36
David Crow13-Apr-09 3:36 
AnswerRe: can someone explain to a newby what the top line argument call. Pin
johnathan warfield18-Apr-09 8:19
johnathan warfield18-Apr-09 8:19 
QuestionWhat does the : x( value ) mean in this constructor ??? Pin
johnathan warfield11-Apr-09 18:25
johnathan warfield11-Apr-09 18:25 
AnswerRe: What does the : x( value ) mean in this constructor ??? Pin
«_Superman_»11-Apr-09 20:50
professional«_Superman_»11-Apr-09 20:50 
GeneralRe: What does the : x( value ) mean in this constructor ??? Pin
johnathan warfield12-Apr-09 7:07
johnathan warfield12-Apr-09 7:07 
GeneralRe: What does the : x( value ) mean in this constructor ??? Pin
«_Superman_»12-Apr-09 18:37
professional«_Superman_»12-Apr-09 18:37 
QuestionHard Disk(Recovery) Pin
kikivml11-Apr-09 9:10
kikivml11-Apr-09 9:10 
AnswerRe: Hard Disk(Recovery) Pin
Hamid_RT11-Apr-09 19:48
Hamid_RT11-Apr-09 19:48 
QuestionRegistry REG_BINARY Problem Pin
locoone11-Apr-09 8:35
locoone11-Apr-09 8:35 
AnswerRe: Registry REG_BINARY Problem Pin
Baltoro11-Apr-09 11:21
Baltoro11-Apr-09 11:21 
GeneralRe: Registry REG_BINARY Problem Pin
locoone11-Apr-09 20:09
locoone11-Apr-09 20:09 
QuestionRe: Registry REG_BINARY Problem Pin
CPallini11-Apr-09 22:46
mveCPallini11-Apr-09 22:46 
AnswerRe: Registry REG_BINARY Problem Pin
locoone12-Apr-09 2:53
locoone12-Apr-09 2:53 

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.