|
To query and set we can use
GetFileAttributes and SetFileAttributes respectively.
dwAttrs = GetFileAttributes(FileData.cFileName);
if (!(dwAttrs & FILE_ATTRIBUTE_READONLY))
{
SetFileAttributes(szNewPath,
dwAttrs | FILE_ATTRIBUTE_READONLY);
}
For user permission on particular folder try this
Check User’s Permissions On A File or Folder[^]
|
|
|
|
|
Thanks For the response.
I can check the read access using this method.
But I want to specifically check the "MODIFY' access.
Is there any way to check the "MODIFY" access.
Thanks...
|
|
|
|
|
if you want to check whether you have MODIFY permission on a folder then call GetFileAttributesEx API
check whether FILE_ATTRIBUTE_READONLY is not set, else you can write and delete, that means, you can modify.
|
|
|
|
|
This information is incorrect. A file can have the read-only attribute not set, but if write permission has been denied, you will not be able to modify it.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Attributes are not the same as permissions, so GetFileAttributes() is not going to do you any good. You'll need to query the file's ACL. Check out GetFileSD() , GetSecurityDescriptorDacl() , GetAclInformation() , and GetAce() .
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
|
Hi,
I really think you should read the forum guidelines and understand how a query has to be send. There is nobody here that will do your work. People here will assist you in doing your task.
All the best
|
|
|
|
|
Hi all !
How do i remove (completely) the menu from an existing MFC SDI application ? (I need only the Toolbar)
Thanks,
Amit
|
|
|
|
|
As per the MSDN it should like below:-
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
if( !CFrameWnd::PreCreateWindow(cs) )
return FALSE;
if(NULL != cs.hMenu )
{
::DestroyMenu(cs.hMenu); // delete menu if loaded
cs.hMenu = NULL; // no menu for this window
}
return TRUE;
}
|
|
|
|
|
Hi,
I am making my application unicode supporting one. i have an edit box which displays chinese characters etc., but not arabic characters...
why it is not showing arabic characters alone? does anyone have any idea about this?
Note: i have my editbox's default font as Arial Unicode MS.
Thanks,
Rakesh.
|
|
|
|
|
define _UNICODE.
wchar_t* p=L"Hello!".
|
|
|
|
|
What does it display instead of Arabic letters? Question marks or some garbage character?
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Hi Rajesh,
it displays some junk characters... in my application, it was showing some vertical lines...
|
|
|
|
|
So, if it doesn't display question marks, it could be as simple as that the machine is not having the language pack installed. Have you tried Michael Schubert's suggestion? I didn't suggest it right away to ensure that you weren't seeing question marks instead.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
but one thing is confusing me alot rajesh...
i have two views for my application..say x and y.(different views)...x is created in runtime...i will create y.. based on y, x will be created actually....i get the inputs from xml file for x view..say font details, bgcolor details etc., i changed font to arial unicode ms everywhere but still its not showing arabic characters alone..
in y view, its showing arabic characters and in another view (x),its showing junk characters..
Thanks,
Rakesh.
|
|
|
|
|
Well, I'm not sure. I've never worked with Arabic characters, but have you checked if it's got anything to do with setting the "reading direct order"? (Arabic is right to left).
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
I think you have to install the language and font support in Windows:
Control Panel -> Regional and Language Options -> Languages -> Install files for complex script and right-to-left languages
|
|
|
|
|
i think your machine doesn't contains the Arabic font, please install and try.
|
|
|
|
|
wat is a clipping region?
|
|
|
|
|
See, for instance here.
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]
|
|
|
|
|
Hi all,
I already managed to connect to the dataase-MySQL:-select and insert the data in the database.
But, my problem is, how am i going to put the data into the list.
Let say when I'm doing the selecting, i got 20 records. And each record is contain 4 fields.
How am I going to set the data to
(field1, field2, field3, field4)
Thanks.
---
res = stmt ->executeQuery("SELECT a, b, c, d from log");
while (res->next()){
res->getString(1);
res->getString(2);
res->getString(3);
res->getString(4);
}
|
|
|
|
|
|
hi,
i dont understand.
mysql website?
|
|
|
|
|
From ur question, what i understood is that, you want to set a data to the a row of the table. So i suggested the mysql website,
If my understand is wrong then please explain ur question.
|
|
|
|
|
Hi,
Tq for your reply.
ACtually, I have one table : log. And it consist 4 fields.. Currently I'm having 20 records..
What I want to do is to have a struct / linked list..
So when I display the data, it will display like
-(field1, field2, field3, field4)
|
|
|
|