|
How do I insert my own entry in Windows Security Center for AntiVirus, AntiSpyware and firewall using WMI ?
Kind Regards
Manoj Jangid
|
|
|
|
|
hi
i am uing copyfile(source,destination,ifoverwrite).from the main application
i am passing the source and the destination path and coping the required file(image) to temp folder and processing it.
the copy file sometimes fails.can any one help me on this issue.
here niether the source nor the destination file is used by my main application.
Thanks in advance
|
|
|
|
|
Do you know about GetLastError ?
BTW third parameter should be FALSE in order to overwrite an existing file.
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
|
|
|
|
|
Did you try with SHFileOperation?
|
|
|
|
|
Hi All,
I am trying to use the API CreateProcessWithLogonW in my app. I get an error message which says "The specified service does not exist as an installed service" with error code 1060. Does anyone has any idea why this is happenning?
Thank you,
AJ
|
|
|
|
|
which OS you are working on, Check whether the RunAs service is started; on Windows XP it is named "Secondary Logon service, possibly for security reason, this service may be disabled in your machine(by admin), check the runas command also.
|
|
|
|
|
Thanks a lot!! I was running it on XP Embedded. That explains why it isn't running!
Thanks again,
AJ
|
|
|
|
|
|
I would like to know the reason why this post is voted down.
|
|
|
|
|
I don't know who has voted down...and how do you vote?
|
|
|
|
|
|
|
Can the performance of this API be improved in any way? I tried out the API and it is way too slow. I guess this might be because of the fact that it has to logon with the credentials that I provide and then launch the process.
|
|
|
|
|
HHOOK SetWindowsHookEx(
int idHook, // type of hook to install
HOOKPROC lpfn, // address of hook procedure
HINSTANCE hMod, // handle to application instance
DWORD dwThreadId // identity of thread to install hook for
);
The fourth parameter is a thread id,not a process id.
While I give it explorer.exe's process id ,the function can't succeed.
How can I do?
In DLL and use Detours.
Science is a forever enigmatic modified on Friday, April 25, 2008 3:34 AM
|
|
|
|
|
Hi,
dwThreadId Specifies the identifier of the thread with which the hook procedure is to be associated.U cannot give processid in place of thread.
A process can have only one process id. In a process is a main thread and one or more child threads. So both are different.If you want to hook Explorer window set the threadId(in SetWindowsHook) to 0 then in HookProc check the class name of the Window and if it is "CabinetWClass" using GetClassName API and hook it.
thanks
Nitheesh
|
|
|
|
|
Thank you very match.
I will try an experiment on it with you said.
But how to get a main thread id with process id?
modified on Sunday, April 27, 2008 9:03 PM
|
|
|
|
|
Hi,
use GetWindowThreadProcessId to get the id of the Thread
thanks,
Nitheesh
|
|
|
|
|
|
Hi all,
What function can I use that is similar to URLDownloadToCacheFile but with the ability to download the part of a file that wasnt downloaded if an internet disconnection happens. I am thinking of a windowsupdate type of download which if I stop downloading the updates I can resume where i stopped.
thanks,
Jj
|
|
|
|
|
See here.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
|
I am having problems with INSERTING 'err' value, where the value always change(dinamic).
The error I am getting at runtime is "too few parameters expected 1". This is a part of the inserting program.
float err;
CDatabase db;
CString SqlString;
db.Open("ODBC;DSN=db");
SqlString="INSERT INTO report(ERROR_VALUE,STATUS) VALUES(err,'OK')";//value of 'err' not statis
db.ExecuteSQL( SqlString );
the program will run properly if syntax of inserting like this.
SqlString="INSERT INTO report(ERROR_VALUE,STATUS) VALUES('err','OK')";
but the output not value of "err", but string "err".
anyone can help me????
|
|
|
|
|
neo on poltek wrote: SqlString="INSERT INTO report(ERROR_VALUE,STATUS) VALUES(err,'OK')";//value of 'err' not statis
try,
SqlString.Format(_T("INSERT INTO report(ERROR_VALUE,STATUS) VALUES(%f,'OK')"), err);
|
|
|
|
|
SqlString="INSERT INTO report(ERROR_VALUE,STATUS) VALUES(";
SqlString += "'";
SqlString += err;
SqlString += "'";
SqlString += ",'OK')";
I think it is working please check.
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
I used the following code to show an image in the row of a listcontrol.
LV_ITEM lvi;
CString item,symbol;
symbol = card.Right(1);
int len = card.GetLength();
item = card.Left(len-1);
lvi.mask = LVIF_IMAGE | LVIF_TEXT ;
lvi.iItem = 0;
lvi.iSubItem = isubItem;
lvi.pszText = item.GetBuffer(item.GetLength());
lvi.stateMask = LVIS_STATEIMAGEMASK|LVM_SETITEMSTATE;
if(symbol.CompareNoCase("C")==0)
lvi.iImage = 0;
else if (symbol.CompareNoCase("D")==0)
lvi.iImage = 1;
else if(symbol.CompareNoCase("H")==0)
lvi.iImage = 2;
else if (symbol.CompareNoCase("S")==0)
lvi.iImage = 3;
player1.SetItem(&lvi);
There are 13 columns in the row. and there is only one row.
I wanted the image to be shown in every column of that row. But the image is being shown only in the first column. How to make it.
Thank you
Saadhinchaali
|
|
|
|