|
Yeah, unfortunately, I can't seen to get it to work. Multiple and various error codes (obviously). I've tried hard coding the \\'s into the path and it still didn't work, althuogh the string looked fine when debugging on breakpoints.
Perhaps I'm just not doing something right with that, but I have copied code that I have found on the 'net and slightly modified it to handle my specific strings.
|
|
|
|
|
I wonder why someone voted you down.
Just a thought: Could it be that you are doing the "standard" mistake when it comes to the backslash character in paths?
Do you have "\\\\remote\\data" in your source code?
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
nakranir wrote: Multiple and various error codes (obviously).
Can you turn your monitor a little to the left? I'm having a hard time seeing those error messages.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
nakranir wrote: Perhaps I'm just not doing something right with that, but I have copied code that I have found on the 'net and slightly modified it to handle my specific strings.
could you please state you error here!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|
|
Can a prgram (in VC6) determine if the current user is member of the Administrators Group?
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|
|
|
Thanks!
I'll try...
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|
|
I.ve used the example shown on the mentioned link, but, trying to use CheckTokenMembership() it didn't work: in VC6 it isn't recognized!
Why?
Anyway, thanks again!
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|
|
Same reason as Judy explained below You need a newer SDK!
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
Win32 API call IsUserAnAdmin
supported under Win2000 and up
Judy
|
|
|
|
|
Wow! I need to upgrade from Windows 3.1!
I'm not the OP but Thanks Judy!
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
I bet you say that to all the girls
When 2k came out and Admin versus User became important, I found that gem real quick.
|
|
|
|
|
JudyL_FL wrote: I bet you say that to all the girls
Nah. Only the ones that give me gems like that! Wait...I say what...
I have to remember when a question like "How to intercept the little X on a CDialogBar?" comes up,
to first look for the InterceptTheLittleXOnCDialogBar() API
Mark
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
Thanks! I'll download it.
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|
|
Thanks! I'll try it...
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|
|
IsUserAnAdmin() isn't recognized by my VC6.
Why?
Anyway, thanks!
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|
|
Make sure you have included shlobj.h (the required include is listed at the bottom of the manual page).
If that doesn't work, you're hitting the problem that you're using an incredibly old product and its include files don't contain APIs that were new for Win200. To get the right includes, you'll need to download the latest SDK and use it.
Judy
|
|
|
|
|
Thanks! I'll download it.
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|
|
RomTibi wrote: an a prgram (in VC6) determine if the current user is member of the Administrators Group?
http://www.visualcpp.org/?p=11[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|
|
Hey, guys.
I looked at the Vista area but it seems to be more usage of the OS and this is a programming question.
If such a thing exists, could someone please point me to the documentation on where the "right" place is to store local app and user data in Vista? I want to avoid Will Robinson UAC messages, and I also want to follow best practices guidelines, i.e. is it preferred to store in the registry, in the \documents and settings path, or perhaps somewhere else.
Anyway, I'm sure this is documented somehere, I just can't seem to locate it. Anyone know where this info can be found?
Thanks!
|
|
|
|
|
For XP, this info is described in detail in the
Designed for Windows XP Application Specification 2.3 Document[^]
section 3.1 I believe.
I'm trying to find the newer document for Vista Logo but currently my search is...well...failing.
I'm probably spelling something wrong. How do you spell Vista?
Anyway, it should be in the Vista Logo requirements document if you can find it.
Mark
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
Yeah, I know what you mean about the search failing...
Thanks, man. I appreciate the help. If you happen to bump into the Vist stuff, let me know.
|
|
|
|
|
Christopher Duncan wrote: If you happen to bump into the Vist stuff, let me know.
If you find it please let me know!
I really hope it hasn't changed. I already eliminated using the registry and followed the XP logo
guidelines in my apps since they hinted way back when XP came out that new apps may have security
issues with using the registry in the future. If it changed it's going to be a PAIN!
Mark
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
Well, you've answered one of my questions. My impression was that use of the registry is now discouraged, so I'm thinking that calling the normal get user app data path routines and storing in the appropriate folder is the way to go.
If I bump into anything worth mentioning, I'll definitely let you know!
|
|
|
|
|