|
When IE downloads an exe file, it checks its signature. Does anyone know how to verify exe signature from our application ? that is, can someone help me find the source code/api to the signature verification tool ?
thanks a lot
Hari
Hari Krishnan
|
|
|
|
|
|
thanks a lot Mike, I'll check it out.
Hari
Hari Krishnan
|
|
|
|
|
Is there any such api which enlists the devices on the computer or WMI SDK is the only option.
Please give a name of the book which explains a the WMI .
A line of code is worth thousand words .If u have got such a code which enlists the devices on the computer i will be obliged.
|
|
|
|
|
Use the setupapi to enum and configure installed device drivers. It might be easier than WMI.
Don't try it, just do it!
|
|
|
|
|
Hi,
I am developing an application in VC++ in which i need to set the date and time of the System in which my application is running.
Please provide me some ways by which System date and time can be set from VC++ Application
Thanks in Advance
R.Gopalakrishnan
|
|
|
|
|
|
hi,
I am using,winsnmputils.exe for get and getnext, now i want to set snmp can u plz help me how to write the code for set.
narasimha varma p
|
|
|
|
|
how to do socket pgming using multi threading???
|
|
|
|
|
Search cp, there are lots of articles.
Don't try it, just do it!
|
|
|
|
|
I have a project on code project just to help you.
- Network Administrator by euacela
i use mutithreading to do it and winsock ofcourse
gabby
|
|
|
|
|
Hello Every Body,
I am facing problem to allocate the global memory to string, which i am going to use with WM_GETTEXT msg during interprocess communication to get text from edit box of another application.
Thanks very much.
[Vote One Here, Complete my Survey....]
Alok Gupta visit me at http://www.thisisalok.tk
"I Think Believe this Will Help"
|
|
|
|
|
Hi,
what do u mean exactly?
SkyWalker
|
|
|
|
|
Hello Sir,
actually i amn't able to use GlobalAlloc and other heap related function, I requires a good reference for that, MSDN is no help till now.
Sir,if you know any link related to memory managment,etc please refer it to me......
I am very much Thankful to u for your reply!!!
[Vote One Here, Complete my Survey....]
Alok Gupta visit me at http://www.thisisalok.tk
"I Think Believe this Will Help"
|
|
|
|
|
|
|
|
|
I am developing a computer monitoring application (client /server), in which the client will send the information about its current devices to server by using an api ( or the server will try to know the devices of client by envoking an api)
Do you know of any api , which lists the devices on a computer? I tried GetCurrentHwProfile ( ) , it fetches the "profile file" which contains the information about the devices configuration.
While seraching MSDN i came across WMI SDK (but it uses VBScript) ? will it be good .Considering the half the program will be using C (GetUserName() api) and half of the program will be using VBScript.
Please help me out!!
Thanks
|
|
|
|
|
You can find this information in the Setup API[^] functions. Be aware that these are not available in Windows 9x/ME.
Software Zen: delete this;
|
|
|
|
|
Here is my worker thread that I create ever 100ms in the OnTimer() function, it works but uses 97% of the cpu. Any help would be appreciated.
POINT pt; // Global for GetMouseProc & OnTimer.
UINT GetMouseProc(LPVOID pParam)
{
HWND hwnd = ::GetDesktopWindow();
::SetCapture(hwnd);
::GetCursorPos(&pt);
::ReleaseCapture();
::ExitThread(0);
return 0;
}
void CColorTakeDlg::OnTimer(UINT nIDEvent)
{
// TODO: Add your message handler code here and/or call default
HWND m_hwnd = ::GetDesktopWindow();
CString str;
// =======================================================================
// Get the mouse pointer position and display it
// =======================================================================
DWORD ExitCode = STILL_ACTIVE;
HANDLE m_hThread;
if(pThread == NULL)
{
pThread = AfxBeginThread(GetMouseProc, this, THREAD_PRIORITY_NORMAL, 0, CREATE_SUSPENDED, NULL);
pThread->m_bAutoDelete = FALSE;
m_hThread = pThread->m_hThread;
}
pThread->ResumeThread();
while(ExitCode == STILL_ACTIVE)
{
::GetExitCodeThread(m_hThread, &ExitCode);
}
delete(pThread);
pThread = NULL;
str.Format("X: %d, Y: %d", pt.x, pt.y);
m_mouse.SetWindowText((LPCTSTR)str);
Old dog learning new tricks!
|
|
|
|
|
Roger65 wrote:
while(ExitCode == STILL_ACTIVE)
{
::GetExitCodeThread(m_hThread, &ExitCode);
}
This is what is taking up the CPU time. If you really need a seperate thread here (doubt it) then you are better off using events and calling WaitForSingleObject() on that event. Even better would be to set the threads m_bAutoDelete member to TRUE and wait on the thread handle.
Check out http://www.codeproject.com/threads/usingworkerthreads.asp[^], especially the section entitled "Thread Shutdown Without Polling".
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
The reason for the seperate thread is if the SetCapture is in the same thread as the controls window they don't get mouse messages. You say wait for the thread handle, what is it destrored?
Old dog learning new tricks!
|
|
|
|
|
For what you are trying to do in the example given I think you are over-thinking your problem. Why even call SetCapture to begin with? Why even have a worker thread? All you seem to want is to get the cursor coordinates every timer tick and display them on your m_mouse window. GetCursorPos does not care about which window has the capture, it justr returns the position of the cursor in screen coordinates. Why won't something like this work?
void CColorTakeDlg::OnTimer(UINT nIDEvent)
{
POINT pt;
GetCursorPos(&pt);
CString str;
str.Format("X: %d, Y: %d", pt.x, pt.y);
m_mouse.SetWindowText(str);
} No worker threads, no global variables, and definitely cleaner than what you have.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
That was version 1.0 it didn't get the cursor from the desktop, just the dialog box. You did however give me a clue, I put a Sleep(1) inside the while(exitcode == STILL_ALIVE), cpu usage dropped to 0.
Old dog learning new tricks!
|
|
|
|