|
My keyboard is a bit slow.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Don't worry pal!
I've voted a 5.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
santhoshv84 wrote: I need to get all the files from a directory in an array. But i cant use CFileDialog..
Even if you could, why would you want/need to?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Hi Friends,
I have written the following code for knowing whether i have access to a particular directory.
CreateFile( (LPCTSTR)szDir, 0, 0, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
where szDir is "C:\\ProgramData\\NewFolder" . It has all kind of access permission.
This is working fine in all OS,but not in Vista.
Can someone tell me the reason.
I am getting ACCESS_DENIED on Vista.
Please try the same on your machine and you will also see same behavior.
Thanks in advance.
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."
|
|
|
|
|
NiceNaidu am getting ACCESS_DENIED on Vista.
I read lot of similar problem with vista in past few days on this forum and always solution was you require Administrator access.
Regards,
Sandip.
|
|
|
|
|
To execute your code in Vista you would need to run your application under the admin account. Does your code work when you are logged in as an admin
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
I am running as Administrator.
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."
|
|
|
|
|
Are you trying to create directory using CreateFile ??
An application cannot create a directory by using CreateFile, therefore only the OPEN_EXISTING value is valid for dwCreationDisposition for this use case.
Regards,
Sandip.
modified on Wednesday, August 6, 2008 6:43 AM
|
|
|
|
|
No. I am trying to check whether i have access permissions to an existing directory.
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."
|
|
|
|
|
MSDN documentation says
To open a directory using CreateFile, specify the FILE_FLAG_BACKUP_SEMANTICS flag as part of dwFlagsAndAttributes. Appropriate security checks still apply when this flag is used without SE_BACKUP_NAME and SE_RESTORE_NAME privileges.
Regards,
Sandip.
|
|
|
|
|
Thanks Sandip..It is working.I missed out that point, though i read the documentation.
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."
|
|
|
|
|
Welcome
Regards,
Sandip.
|
|
|
|
|
One solution is Disable the User access control.
1. Launch MSCONFIG by from the Run menu
2. Click on the Tools tab. Scroll down till you find "Disable UAC" . Click on that line.
3. Press the Launch button.
4. A CMD window will open. When the command is done, you can close the window.
5. Close MSCONFIG. You need to reboot the computer for changes to apply.
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
Disabling UAC is not preferable.
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."
|
|
|
|
|
I know it is not the preferrable solution but i dont find any other solution to resolve my problem
I am using SetWindowHookEx API and as an argument i use JournalPlayBack and it is working fine in other OS but not in vista.
1)I run it as an admin.
2)change manifest file.
I tried all hit and trial but not find any solution than i disable the UAC.
In your problem you find the solution but for JournalPlayback there is no solution except this as per as I know.
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
I have an ActiveX control with button, combobox and cedit on it and hosting mfc app with this ocx. I would like to create an event in my ActiveX control which fires when the button is pressed, combobox selection or text in cedit changes to take some actions in hosting mfc app. I have no idea how to do that ;/ Any ideas?
|
|
|
|
|
Hi ,
I am working on an simple vc++ application using vc6.0.
When I compile my code I am getting lots of warnings like:
c:\program files\microsoft visual studio\vc98\include\xtree(120) : warning C4786: 'std::_Tree<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,
std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<cha
r,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Kfn,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::basi
c_string<char,std::char_traits<char>,std::allocator<char> > > >' : identifier was truncated to '255' characters in the debug information.
This is a single warning.
Is it beacuse I added an template??
If so please help me how to getrid of this one.
Regards,
Sunil Kumar
|
|
|
|
|
it is because the identifier has more than 255 characters, which is truncated in debug build.
just don't bother with this.
if you want to hide it, insert the following in your stdafx.h (or any common header if any) :
#pragma warning(disable: 4786)
|
|
|
|
|
Hi all,
Please tell me how can Create Shortcut keys in MFC-SDI type application?
i want to open any dialog of shortcut key.
thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
If you want them to be global, take a look at this article at the CodeProject. However, if you only want the shortcut to work from within your application, then you'll have to process the keyboard input yourself.
Hope this helps,
--Perspx
"The Blue Screen of Death, also known as The Blue Screen of Doom, the "Blue Screen of Fun", "Phatul Exception: The WRECKening" and "Windows Vista", is a multi award-winning game first developed in 1995 by Microsoft" - Uncyclopedia
|
|
|
|
|
I want the shortcut is work from within my application,please tell me how can i do this.
please tell me with example if possible
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
In Resource Tab->Accelerator..
Enter the ID of Dialog box and give shortcut key for that.
Anu
|
|
|
|
|
i m try this but its not working
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
You can use the WM_SETHOTKEY message.
See the documentation on MSDN.
Hope this helps,
--Perspx
"The Blue Screen of Death, also known as The Blue Screen of Doom, the "Blue Screen of Fun", "Phatul Exception: The WRECKening" and "Windows Vista", is a multi award-winning game first developed in 1995 by Microsoft" - Uncyclopedia
|
|
|
|
|
Can you explain with example please.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|