|
I want to check whether the current user has privilege/rights to read a file.I need info on the "right" API to use for this purpose.
I came across, CreateFile, GetFileSecurity,GetKernelObjectSecurity. I'm a bit confused over to which one to use. Also this is the first time I'm goin thru the security stuff.
thanks
Kannan
|
|
|
|
|
GetFileSecurity() is better
make sure abt READ_CONTROL_ACCESS
Renjith-The CPian.
|
|
|
|
|
hi ,
i am working on a (GUI)project.
i have created the dialog boxes and now i have to write a code which processes the inputs.can you tell me where i have to write the code.i.e in which file.
|
|
|
|
|
Please don't ask the same question twice.
Surely your dialog box has a class attached to it ? Use the class wizard to associate variables with the input items in the dialog, and then process them there.
I also suggest you do some reading - I suspect most of the articles here will be above your head, but there are some beginner ones which would answer this sort of question adequately. Check out the FAQ as well.
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
Half the reason people switch away from VB is to find out what actually goes on.. and then like me they find out that they weren't quite as good as they thought - they've been nannied. - Alex, 13 June 2002
|
|
|
|
|
Is There a Class along with ur GUI? just add ur code there..
Renjith-The CPian.
|
|
|
|
|
hi,
i have created the dialog boxes.
where should i write the code so that the code processes the input values taken from dialog boxes.
|
|
|
|
|
Hi, I am Steve, and I need your help. I have a problem: I have to make this
program in Visual C++, that takes a file, encrypts it, in whatever way, and then sends
it to some address, specified by me. Can you help me with this? I mean, can you
send me some code for encryption and sending the file on the net, or on the
interface I have to use? I am just a newbie, and I do not know so much C++ to
do this.
Thanks,
Steve
You can write me some suggestions on my email address: "steve_cluj@email.ro"
Steve
|
|
|
|
|
i dunno think the workspace with all of ur requirement ! here.but you can find all of them as a seperate project..just find out them and integrate..do something from ur side tooo..CP ians didnt like to SpoonFeed...we can say what..but !how..
Renjith-The CPian.
|
|
|
|
|
"take a file and encrypt it" is easy if you don't care the encrypt method. but "send it to some address", how do you want to do? by mail or send file by a connection? i guess your program need to work in both site, sender and receiver. right? then in sender, it take a file, encrypt, send to a receiver; in receiver, your program listen the port, get the encrypt file, decrypt it.
you need to give more details.
Jimmy
|
|
|
|
|
Well, I have to send the file over the net, by a connection. And you said it right, something like this I have to make. Just some more programming on sockets, and the method of encryption does not matter much. The program has to know only how to encrypt, to decrypt, to send to a specific address and port, and to receive the file, with a confirmation. That's all. The problem is the code...Can you help me on this part?
Thanks for the reply
steve
|
|
|
|
|
Well, I have to send the file over the net, by a connection. And you said it right, something like this I have to make. Just some more programming on sockets, and the method of encryption does not matter much. The program has to know only how to encrypt, to decrypt, to send to a specific address and port, and to receive the file, with a confirmation. That's all. The problem is the code...Can you help me on this part?
Thanks for the reply
steve
|
|
|
|
|
Hi.
Is there a function to get a substring of a CString object? I can use GetAt() in a loop. Nonetheless, I was wondering if there is a function specifically for accessing a substring of a CString object similar to an STL string object.
Thanks,
Kuphryn
|
|
|
|
|
Certainly! The Mid() function has two overloads. In both cases, the first parameter is the starting index of the substring. If you pass a second parameter, it is the count of characters in the substring to return. Or if only one integer is passed, the remainder of the string is returned.
Scot Brennecke
Software Developer
VC++ MVP
|
|
|
|
|
|
|
How to change the caption for a STATIC control under a dialog box with codes? I've try sending WM_SETTEXT to the STATIC's wndhandle (obtain from ::GetDlgItem)... but it does nothing.
|
|
|
|
|
Oh. Thanks anyway. I've tested that out. We need to SET it after ShowWindow... *sigh*... is it true?
|
|
|
|
|
No, that isn't true. But you should use SetWindowText instead of WM_SETTEXT.
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
Yep.. I did that (both SetWindowText and WM_SETTEXT)... but no text is changed.... if I set it between Create and ShowWindow, nothings happen.
But if I set it after ShowWindow, yes it works!
And btw, I'm using the old MFC 4.21 (i.e. from VC++ 97)
|
|
|
|
|
You can associate a dialog class member with the static control. But you need to change the default control id of the static control for that.
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
|
|
|
|
|
I already change the default id to something else (e.g. IDC_SOMEDIALOG_LABEL)
|
|
|
|
|
Hi. I am also new in templates. I wrote a template class:
template<class t=""> class CExample
Now, I asked this before but am really confused.
I know that to declare it I do:
CExample<class t=""> m_Example;
What if I want to do this using "new"?
Is it
CExample<uint>* m_pExample;
m_pExample = new CExample<uint>;
Something like this???
Then to clean up:
delete m_pExample; (Anything special)
THanks in advance.
|
|
|
|
|
You need to check the "Display as-is" checkbox so the template params show up properly.
Given this class:
template <class T> class CExample
{
public:
T increment(T t) { return ++t; }
}; you refer to the class later with CExample plus a typename which takes the place of T :
CExample<int>* pExampleInt = new CExample<int>();
pExampleInt->increment ( 123 );
delete pExampleInt;
--Mike--
Just released - RightClick-Encrypt - Adds fast & easy file encryption to Explorer
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Hi Mike.
What do you mean by "Display as is?"
|
|
|
|
|
The checkbox below your post as you type it which says "Display this message as-is (no HTML)"
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
Half the reason people switch away from VB is to find out what actually goes on.. and then like me they find out that they weren't quite as good as they thought - they've been nannied. - Alex, 13 June 2002
|
|
|
|