|
Thanks Carrivick. I hope it will resolve my problem.
Naag
|
|
|
|
|
Were you passing NULL in the Secutity Attributes ?
|
|
|
|
|
As Mark pointed to, it is important to run the service in a spezific account, so an outside program has access rights. Or as in M.Dunn project the objects becomes lower rights so it can accessed.
This is all about accounts and access rights, really boring and bad documented stuff.
Greetings from Germany
|
|
|
|
|
I have a Form where i need to set a string value (NA) and double value.
In DDX_TEXT i use a double variable.
When i set the string value, and updatedata(TRUE), it says "Please enter a number". How to avoid this error message?
Thanks
Thanks
Raji
|
|
|
|
|
if you want to enter a string on the editbox(I think you used of editbox) you can use of SetWindowText .
|
|
|
|
|
Thanks. It works. But since it is a string, while modifying some other edit filed (number) and updatedata(TRUE), the error message "Please enter a number" is displayed. Please let me know a way to avaoid this error / catch this error message.
Thanks
Thanks
Raji
|
|
|
|
|
RajiRaghu wrote: string value (NA) and double value.
I think you need to use SetWindowText and GetWindowText, instead of using control variable as double. Or simply how can string value like "NA" be stored in double?
- NS -
|
|
|
|
|
ya. But there are lots of calculations involved.
Thanks
Raji
|
|
|
|
|
AfxTextFloatFormat is called by DDX_Text where this message is generated.
I can say another option. Add a member function same as UpdateData(BOOL bSaveAndValidate = TRUE). Remove DDX_Text entry in the DoDataExchange. Convert the window text to double in the new UpdateData if the BOOL bSaveAndValidate is TRUE (if it is NA you can check it also) and do vice versa if FALSE. Also call the CDialog::UpdateData(bSaveAndValidate) so that other control variables will not be affected.
Hope it is OK.
- NS -
|
|
|
|
|
RajiRaghu wrote: When i set the string value, and updatedata(TRUE)...
That could be a source of your problem. Use SetWindowText() instead of UpdateData() .
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
In an Visual C++ 6.0 application, I need to prevent copying the specified file to other directory, but I don't know how to do.
Please help me!!!
Thank you very much!
P.S. If maybe, you can demonstrate an small application about this.
Thank you!
|
|
|
|
|
Prevent who ?
You could open the file with CFile and use one of the flag to prevent other processed to access it.
|
|
|
|
|
You would need to set this restriction at the OS level.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Create a service which opens an exclusive handle to the file. This will prevent copying and deleting.
|
|
|
|
|
If maybe, you can demonstrate how you do it? Because, I don't still understand you. Can you help me!!! Please!!!
Thank you very much!
|
|
|
|
|
Using the mfc CFile class
CString file_name = _T("C:\\AnotherFile");
CFile f;
f.Open( file_name, CFile::modeRead | CFile::shareExclusive );
while(1)
Sleep(1000);
|
|
|
|
|
Hi all,
I would like to know wheter there is any way (using code) in which I can get hold of the system log, in terms of, when Windows has finished downloading updates and needs to restart. See the reason I'm asking is because some of our computer are never used by users, but still need security updates, and in the light that after every update Windows needs a restart, there will be no user to do so. Any suggestion ??
Many Thanks
Reagrds,
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
Programm3r wrote: in which I can get hold of the system log
You mean you want to read the eventlog? check ReadEventLog()..
|
|
|
|
|
|
Sorry just another quick question:
Am I correct to say that I can locate the event log in the following directory:
C:\Windows\system32\config\AppEvent.Evt
Many Thanks in advance
Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
Programm3r wrote: Am I correct to say that I can locate the event log in the following directory:
Eventhough by default the file for "Application" events comes in the above mentioed path, it can be changed by changing the values in registy. Search the registry for value "C:\Windows\system32\config\AppEvent.Evt"
|
|
|
|
|
|
I'm looking at the following example, and I'm not sure what parameeters to pass to the function:
Querying for Event Information[^]
Could you please help?
Thanks again .....
Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
|