|
Thanks for reply..
Certain applications & Processes logs events to respective logs like Application, System and Security logs. So is there any way that without executing certain application, we can log the event on behalf of that particular application.
I know there APIs available for this task, but they dont allow to write in SECURITY LOGS, and my task is to write in Security Logs. So how can this be solved??
|
|
|
|
|
Ahh, Now that makes sense to me. Sorry for wasting your time as I don't know the answer to the new question.
|
|
|
|
|
Hi,
Im my dialog i use combobox to list all OPC servers.
Each tiem when i click "ListServer" button in my dialog..it displays all registered servers in combo box.
Iam using OPCEnum to get server list,the function is
int NumberOfOPCServers (BOOL UseOPCENUM, LPCSTR MachineName);
In that list there are also unwanted server list which i dont have any work in that is also displayed.
Is there any option to not display this kind of unwanted servers.
-- modified at 1:33 Wednesday 26th July, 2006
|
|
|
|
|
if you dont need to these items why you add these item to your combobox
|
|
|
|
|
Hi,
In my MFC application i registered my server by using one clsid from GUID.exe as follows
SvrName = "EsimServer";
SvrDescr = "Prosimulator OPC Server";
UpdateRegistry ((BYTE *)&Svr_Clsid, SvrName, SvrDescr, HelpPath);
I gave clsid in top of my coding.
My problem is in same application i want to register different servers.
That is EsimServer1,EsimServer2,EsimServer3...
Can i do this by using the same clsid for all server register.
Anu
|
|
|
|
|
you have to use separate CLSID for each com component.
in this way u can register multiple servers
Sudeesh
|
|
|
|
|
Generally we have seen that when put out mouse over any control it displays some description about that after some time How can we implement that in our VC++ environment Kindly guide me regarding this
Thanx in advance
|
|
|
|
|
|
abhiku28 wrote:
mouse over any control it displays some description
This should help[^]
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Hello everyone!
I spent like 10 mins trying to fix a function, but it didn't make sense... The problem was that, I was mixing 2 other funcs into that one, one was bool , the other was int ... It had bool type, but it returned int , so that was the problem, 0 = false !
If 0 is the "good" value for int , isn't bool backwards?
Windows Calculator told me I will die at 28.
|
|
|
|
|
I'm not sure what it is that you're saying here, but an int can evaluate to bool automatically, 0 is false. How is 0 'the good value for int' ???
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
true = !false;
false = !true;
So, if true = 1, !true = 0. If false = 0, !false = 1. At least this holds true for VC6, not sure about other languages or compilers. (I know in icky VB, True=-1 and False=0).
Not sure what you mean by, 0 is the "good" value for int...
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
Hi,
you didn't mention the functions. Therefore this is just a wild guess.
There are many functions, that return an int to indicate success or failure. Usually a 0 means a success and everything else indicates an error. This is typically done, when throwing an exception is not an option.
Regards,
Tim
|
|
|
|
|
Hmm... In VC++ 2003, it's like Steve said it was like in VB, true = 1 , false = 0 ... Or am I wrong? Maybe returning int on a bool func was the mistake?
Windows Calculator told me I will die at 28.
|
|
|
|
|
Kixdemp wrote: In VC++ 2003, it's like Steve said it was like in VB, true = 1, false = 0... Or am I wrong?
This is correct.
Kixdemp wrote: Maybe returning int on a bool func was the mistake?
From your description, I don't understand what you are doing. Can you provide a short code sample?
Regards,
Tim
|
|
|
|
|
Actually in VB true is -1 and false is 0. (because they used bitwise AND to test for it i think)
BOOL (which is a typedef for int) should be either TRUE (1) or FALSE (0). Why are you returning int if the return type is bool? It has to do unneccesary conversions.
|
|
|
|
|
The return values for APIs can be:
int or long or DWORD : 0 = success (or ERROR_SUCCESS or NO_ERROR , all defined as 0), non-zero = failure.
BOOL (not bool ): FALSE (zero) = failure, non-zero = success. Note that with BOOL, any non-zero value should be interpreted as "true", therefore never test a BOOL against TRUE , only against FALSE .
HRESULT : Use the SUCCEEDED and FAILED macros to test for success/failure.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
Kixdemp wrote: If 0 is the "good" value for int, isn't bool backwards?
There's only one reason for success, but there can be several for failure. That's why a function typically returns 0 for success.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi All,
I need to develop a client program with C++/MFC that let user can dowload the file from my Servlet Server. I mean from C++ program we can send a POST or GET to servlet server to send the data and can download a file.
Any help in this.
Thank in advance!
|
|
|
|
|
|
See CFtpConnection if it suits your needs.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Hope I understood your question
See URLDownloadToCacheFile and URLDownloadToFile and also you can see a example from Mr Michael Dunn for URLDownloadToFile
|
|
|
|
|
Yah, I think I need use CInternetConnection and maybe URLDownloadToCacheFile and URLDownloadToFile for this application, but I don't know how to use this.
From C++ program I need to connect to a servlet server for request or download file.
Please let me know where example from Mr Michael Dunn is?
Any help again,
Many thank to you!
|
|
|
|
|
|
I used manifest file to make my UI interface into Xp style. And I want the checkbox and option button transparent. But when I SetBkMode(TRANSPARENT) in CtlColor. There is a black rectangle on the checkbox. How to remove the black rectanble.
My code is under VC .NET.
-- modified at 23:28 Tuesday 25th July, 2006
|
|
|
|