|
Hi All,
I have an application which updates itself when new version is available . But thises updates are having a problem if the app is run by a user having non admin rights , as the service alters the files in %program Files% folder , registry settings while updating . if the user is a non admin then these processes fail and thus the update fails . Is there any way by which i can find if the logged in user is a administrator or not ? so that i dont allow updates for a non admin user ???
Thanks in Advance
Vijayeta
|
|
|
|
|
vijayeta wrote: Is there any way by which i can find if the logged in user is a administrator or not ?
IsUserAnAdmin()
|
|
|
|
|
IsUserAnAdmin() where is this method ?? , as i am using MFC
|
|
|
|
|
it is declared in ShlObj.h and is located in the dll shell32.dll. You need to install platfor sdk to class this function. Optionally you can dynamically load the dll and call it with the help of LoadLibrary and GetProcAddress().
|
|
|
|
|
|
Naveen.R wrote: You need to install platfor sdk to class this function
Depends on the version of Visual Studio - the function was added for W2k. It is included in the VS2005 headers.
Judy
|
|
|
|
|
netusergetlocalgroups
Prasann
who else
|
|
|
|
|
chk this link.
http://www.codeproject.com/win32/accessctrl2.asp#Groups
Appu..
"Never explain yourself to anyone.
Because the person who likes you does n't need it.
And the person who dislikes you won't believe it."
|
|
|
|
|
|
Hi all , i used the IsUserAnAdmin() func and it worked on windows XP , but it fails on Vista , on Vista even foa an Admin it is returning False , can anybody help me out in this matter ??
Vijayeta
|
|
|
|
|
Hi! I m trying to view a MS Word *.Doc File in HTML view in VC++,by using Navigate2() function of CHtml view class. But the problem is that when the File viewed on HTML view all controls work,means i can right click on it,save this file by using F12 key ,open its help by pressing F1 key and all the other control. I just want to stop(disable) the working of these control. If i do EnableWindow(FALSE),it not only stop the working bt also stop the scrolling. I just want to stop the working of *.doc controls.
Raj
-- modified at 6:33 Wednesday 24th October, 2007
|
|
|
|
|
Hi All,
Can somebody tell me the reason ,Why wizards generate enum IDD for dialogs?
Thanks,
Appu..
"Never explain yourself to anyone.
Because the person who likes you does n't need it.
And the person who dislikes you won't believe it."
|
|
|
|
|
NiceNaiduCan somebody tell me the reason ,Why wizards generate enum IDD for dialogs?
The IDD enum of a dialog class contains the ID of dialog in the resource.
enum { IDD = IDD_MYDLG_DIALOG };
This IDD is passed in the constructor of your dialog to CDialog constructor.
CMyDlg::CMyDlg(CWnd* pParent )<br />
: CDialog(CMyDlg::IDD, pParent)<br />
{<br />
}
You can simply get the ID of the dialog with a statement like CMyDlg::IDD
So when creating a dialog, we can use like
CMydlg dlg;<br />
dlg.Create( CMydlg::IDD, 0 )
Instead of
CMydlg dlg;<br />
Dlg.Create( IDD_MYDLG_DIALOG, 0 )
When MFC was initially developed a statement like the below one was not supported.
Class CMyDlg: public CDialog<br />
{<br />
....<br />
<br />
public:<br />
static const DWORD IDD = IDD_MYDLG_DIALOG;<br />
}
Also the trick of keeping an enum doesnt increase the memory size of object
|
|
|
|
|
Thanks Nave..
Don't get surprised, if someone says " You are my Role Model.".
You are doing good job.
Keep going.
Appu.
Appu..
"Never explain yourself to anyone.
Because the person who likes you does n't need it.
And the person who dislikes you won't believe it."
|
|
|
|
|
Hi,
My problem is that I dont want to have my HTML files unprotected as simple files that everyone can view them.
So, Is there anyway to use with CHTMLView, HTML files that are stored in Compound File (IStorage) directly (without extracting them in a temp file)? Alternately is there any other method to use CHTMLView with HTMLs files that are protected in some way ?
I checked up the standard Windows Help *.CHM format but i think its too much complicated to use a such kind of solution.
Any ideas ?
Regards,
sdancer75
|
|
|
|
|
Hello frnds...
I m confused in types of DLLs. when and where to use specific type of DLL/
Can u please tell me the difference between tyes of Dll
MFC DLL : Win32 DLL:
1)MFC extension
2)Statically Linked Statically Linked
3)Shared(dynamically)linked Shared(dynamically)linked
Thanks in advance
|
|
|
|
|
|
Type
TNO11
TNO33
in MSDN
Note: it is alphabet O and not zero
|
|
|
|
|
ccpptrain wrote: Type
TNO11
TNO33
in MSDN
Note: it is alphabet O and not zero
Correction - It is 0 (zero - digit) and not alphabet O.
Regards,
Paresh.
|
|
|
|
|
I want to store data of distinct datatype at runtime.
so how can i do this?
Is there any provision for this kind of support in MFC?
Manish Patel
B.E. - Information Technology
|
|
|
|
|
What do you mean exactly ? Your question isn't clear at all. Are you looking for something like an union ?
|
|
|
|
|
I have one class which store two values, one of type CString and another i want which can store any data type
Manish Patel
B.E. - information Technology
|
|
|
|
|
Manish_mnp wrote: another i want which can store any data type
Why do you need to do such a thing ? Can you explain in details why this is needed ?
C++ is type safe, so you cannot just have any kind of data (or you could use a void pointer and cast it to what you need but this is ugly and will bring you a lot of problems).
|
|
|
|
|
I am recieving RTMP packet from flash.
It is for flash Object.
Now the data in object may get change runtime.
So how can i do same thing as like flash in MFC?
Is there any facility in MFC through which i can do this?
|
|
|
|
|
I still don't know what you are trying to do. So you receive a packet and it contains some data. How is this packet structured and how do you know which kind of data is contained in the packet ? What are the different data types that you can receive ?
When you need to use this data later, how will you use it ? What will you do with it and how will you identify what kind of data it is ?
You cannot just store any kind of data (well, not easily and it is in general far from being good practice), so what I'm trying to do is understand what you are trying to do in order to help. So, if you don't give enough information, I cannot help (and saying that you want to store any kind of data is not really usefull information). So, please be complete in your answer.
|
|
|
|