|
I am using VC++6.0
error C2065: 'IsUserAnAdmin' : undeclared identifier
|
|
|
|
|
The function information of IsUserAnAdmin() says - "Shell32.DLL version 5.0 or higher will be required" to make use of this call, which means earlier versions won't have this function exported at all.
See here[^]. You'll need the latest SDK (or the SDK which is latest enough and has version 5.0 or higher of Shell32.DLL) to use this call.
|
|
|
|
|
I am using File version 6.0.3790.4184.. But still I am getting a compilation error.
|
|
|
|
|
Do you have the Feb 2003 version of the Platform SDK?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Rajesh R Subramanian wrote: My telescope is missing. Can you tell me the what exactly the error is?
Nope. Go back home and get the telescope.
BTW: Eventually MFC appeared in your profile
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
CPallini wrote: Nope. Go back home and get the telescope. [Poke tongue]
Sorry, but I see the question was not "very urgent", so I could ask the OP to take some time to let me know more of the error.
CPallini wrote: BTW: Eventually MFC appeared in your profile [Big Grin]
|
|
|
|
|
Rajesh R Subramanian wrote: Sorry, but I see the question was not "very urgent", so I could ask the OP to take some time to let me know more of the error.
You're wrong: "very urgent" it's the default.
"Plz plz very urgent" is the courtesy form.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
"Attack of the Urgent Monkeys"
BTW, we're dangerously close to hijack this thread.
|
|
|
|
|
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Use BOOL IsUserAnAdmin(VOID);
Perform writing to the registry only if this function returns true.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
This api is giving a compilation error in VC++6.0
|
|
|
|
|
Here is the code for IsUserAdmin
<code>
BOOL IsUserAdmin(VOID)
{
BOOL b;
SID_IDENTIFIER_AUTHORITY NtAuthority = SECURITY_NT_AUTHORITY;
PSID AdministratorsGroup;
b = AllocateAndInitializeSid(
&NtAuthority,
2,
SECURITY_BUILTIN_DOMAIN_RID,
DOMAIN_ALIAS_RID_ADMINS,
0, 0, 0, 0, 0, 0,
&AdministratorsGroup);
if(b)
{
if (!CheckTokenMembership( NULL, AdministratorsGroup, &b))
{
b = FALSE;
}
FreeSid(AdministratorsGroup);
}
</code>
<div class="ForumSig">Somethings seem HARD to do, until we know how to do them.
;-)_AnShUmAn_
</div>
|
|
|
|
|
Thanks.. But I written a user define function and written the above code.. I am getting a compilation error at CheckTokenMembership...
|
|
|
|
|
You should do the following:
Header: Declared in Winbase.h; include Windows.h.
Library: Use Advapi32.lib
And look for Advapi32.dll. Check out MSDN for more details
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
If you can speak Chinese,you can go to"www.csdn.net" .He will help you !
|
|
|
|
|
Hai all,
I need your help to retrieve the information shown in Local area connection status dilog in vc++ or c++.
The informations are uploaded and downloaded packets,Duration.
Thanks
|
|
|
|
|
This article might be of some help.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
HI All,
Im new to MFC.I have done a Dialoged based GUI(Im using Bitmap Buttons).I need to use UP and DOWN keyboard event for that buttons.Help me.Very Urgent.........
Thanks & Regards
Anitha
|
|
|
|
|
Is it for selection change? Please explain your purpose
|
|
|
|
|
yes, i need for selection change.
|
|
|
|
|
is it just for selection process, No need to up and down key event.Do u want to do somthing when it selected?
|
|
|
|
|
I have started working on this issue. Once I get an acknowlegement for the amount transferred by you I will send you the code.
Don't be surprised if it contains some bugs as it is being done on an URGENT basis.
You must be having a class derived from CBitmapButton or CButton (or in whatever way you show bitmap on the button). Why don't you handle it there?
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Im using 5 bitmap buttons and I need the UP and DOWN keyboard event for selection process.
|
|
|
|
|
AnithaSubramani wrote: Very Urgent.........
Of course.
BTW this may help [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Perhaps you need to override PreTranslateMessage() like:
BOOL CMyDialog::PreTranslateMessage(MSG* pMsg)
{
if (WM_KEYDOWN == pMsg->message)
{
if (VK_UP == pMsg->wParam)
TRACE("You pressed the UP arrow.\n");
else if (VK_DOWN == pMsg->wParam)
TRACE("You pressed the DOWN arrow.\n");
}
else if (WM_KEYUP == pMsg->message)
{
if (VK_UP == pMsg->wParam)
TRACE("You released the UP arrow.\n");
else if (VK_DOWN == pMsg->wParam)
TRACE("You released the DOWN arrow.\n");
}
return CDialog::PreTranslateMessage(pMsg);
}
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|