|
Norton antivirus's corporate version automatically discovers all the clients when installed on the server and THEN AUTOMATICALLY INSTALLS A client version of antivirus on the remote system
How does it do that ?
All the users and their IP address can be found out i guess , but how can it install on the remote machine ?
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
http://www.mastishk.com
|
|
|
|
|
After using the abysmal Sophos antivirus software, which employs a similar technique, I would guess that each machine will have a small client already installed. This client will download any new updates, and install them itself.
|
|
|
|
|
mailMonty wrote:
How does it do that ?
My guess is with RPC.
Remote Task Manager works in a similar fashion. When connecting to a remote machine, if it detects that the remote machine does not have the RTM service installed and running, it will install and start the service, and then connect. It is very seamless.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I've got an mp3/wav player working quite well, but when i use the application to record and then play the file back, the time (length) is wrong. The file saves/plays fine.
mciSendString("open new type waveaudio alias current wait", 0, 0, 0);
mciSendString("set current format tag pcm bitspersample 16 channels 1 samplespersec 44100 wait", 0, 0, 0);
mciSendString("record current from 0 overwrite", 0, 0, 0);
.
.
.
if(m_saveFile.DoModal() == IDOK)
{
CString saveFile = "save current "+ m_saveFile.GetPathName() + " wait";
mciSendString(saveFile, 0, 0, 0);
mciSendString("close current wait", 0, 0, 0);
when i open the file and query the time format it returns "milliseconds", but the time it gives me (querying length) is usually about ten times what it actually is. The application gives the correct length of pre-saved files.....
ring any bells?
|
|
|
|
|
HI ,
I m biulding an application like Video Media player .
I saw many appliction on Codeproject ,, but no one is of mine kind help
I have a slider in it ,, to move the video postion same as in Windows Media Player.
I m Using MCI Api's ....
Slider Control only Gives three Message Handlers
1. CustomDraw (..........)
2, OutofMemory(..............)
3. ReleasedCapture(...)
Which one i Should use..
Or some thing else way
Means i want to click on slider thumb and move it ,, too n froo.
or click on on any where on slider and thumb goes there.
thanx
|
|
|
|
|
use releasedcapture, getpos() of the slider, then play from that position. need to be sure of your current time format in relation to the slider values.
|
|
|
|
|
I m not Capturiong the Slider's THumb.
HAve u any Sample..
plz send at
zahid_ash@yahoo.com
thanx
|
|
|
|
|
this isnt an actual block of code as such, just bits pasted together to illustrate the point....
void CSPlayerDlg::OnReleasedcapturePosSlider(NMHDR* pNMHDR, LRESULT* pResult)
{
nextPos = m_position.GetPos()
mciSendString("play current from 0 notify",0 ,0, this->GetSafeHwnd());
}
you'd want to play from m_position.GetPos(), not from zero, you'll have to format the string appropriately....
you also want to set the slider range to the length of the file your playing.
|
|
|
|
|
|
Hi Friends,
I've Problem exporting a Modal Dialog from a Regular MFC DLL (Shared Library). But on runtime i'm getting error when i call the DoModal on the DLL side. This is happening for both MFC DLL Depended Host Application as well as the Win32 Host Application .
The Code is like this
//on the DLL Side
extern "C" void __declspec(dllexport) TestFunction();
void TestFunction()
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
CMyDialog dlg;
dlg.DoModal();
}
//On the Caller Side
extern "C" void __declspec(dllimport) TestFunction();
void CMyTestApp::OnAppAbout()
{
TestFunction();
}
Please Help Me... !
Kind regards,
Subbi.
|
|
|
|
|
Madame,With all due Respect,
Basiclly i never head of exporting class from MFC Regular DLL.
i think only MFC Extention DLL provide support for exporting class.
in my opinion,You create a MFCExtention DLL and then try to export Model Dilg class.
don't remeber to precede the DLg className with AFX_EXT_CLASS macro,then only you able to export it
-----------------------------
"I Think It will Work"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
Hi Alok,
I think you have understood the problem not clearly. I'm creating a MFC Regular dll not a MFC Extention DLL as first.
Further What i'm trying to export is a C++ Function rather than the MFC Dialog Class (the TestFunction in this case). The Problem is whenever i try to call the Modal Dialog the Application breaks.
Kind regards,
Subramanian Iyer.
|
|
|
|
|
Soory Again,Madame.
previously i think you want to export Dialog in your Main Application,that why i suggest you MFC Extention DLL because i am successfull in exporting Dialog Class using MFC .
but i think you want to create Regular dll that can show Dialog.,ok pls tell me is you seeing any error or assertion call,if yes pls send me the error code.
-----------------------------
"I Think It will Work"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
Hi Alok,
I've my application break at the point when it tries to run the modal loop
I've the call Stack goes like that
Call stack:
CWnd::RunModalLoop(unsigned long 4) line 3478 + 11 bytes
CDialog::DoModal() line 536 + 12 bytes
InvokeModalDialog(HWND__ * 0x003d0290) line 72
And it seems that line 3478 of Wincore.cpp is calling the AfxGetThread() Which is returning NULL.
I thnink it will give you a clear picture...
Kind Regards,
Subbi.
|
|
|
|
|
Hi,
I see no reason why your code should fail, under normal circumstances.
Infact, I tried your code (dll+exe side), and it compiles and runs perfectly well.
Something other than your test code could be causing the problem. It would help if you specified what else you are doing.
Bikram Singh
|
|
|
|
|
Hi Bikram,
Is it possible for you, can you kindly send me Your Test Application to me, so that i can find out the problem in my code. Even one of my other friend tried the same, even he got the same result.
Kind regards,
Subbi.
|
|
|
|
|
sure. i'll email it to you.
Bikram Singh
|
|
|
|
|
Bikram,
Really Thank You so much for your code. I found the Problem with my code.
Actually I've created a Win32 DLL thru' the Application wizard first and then I set the property to use MFC in Shared Dialog. So, i've no CWinApp Object Created, rather i've only the DLLMain function in the Application, which leads to the failure of the Application call by which i get a NULL pointer, of the AfxGetApp call in the RunModalLoop function.
Again I thank you for your help.
Kind Regards,
Subbi.
|
|
|
|
|
Hi,
is there any way to get the oject pointer using WriteProcessMemory,ReadProcessMemory and windows hooking.
Regards
Abhay
|
|
|
|
|
Hi,
is there any way to get the oject pointer using WriteProcessMemory,ReadProcessMemory and windows hooking.
Regards
Abhay
|
|
|
|
|
it is possible.
what does 'object' mean? C++ object? Win32 object?
Bikram Singh
|
|
|
|
|
i need to develop a process monitor which will show all the open ports in the machine. how do i proceed?
|
|
|
|
|
serch for Port Scanner On CP ,you will many good Code for that.
An idea Behind it is.
create a socket application and connect each and every port
on local system.like this.
<br />
CSocket a;<br />
a.Create();<br />
CUintArray b;<br />
for(int i=0;i<=1024;i++)<br />
{<br />
if(a.Connect("127.0.0.1",i)==TRUE)<br />
{<br />
b.Add(i);<br />
a.close();<br />
}<br />
a.close();<br />
::Sleep(1000);
}
and CUIntArray b contain all open port on your system
-----------------------------
"I Think It will Work"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
hello,
i need to identify a machine (pc) in a unique way, is there a solution to get the id of motherboard or processor, the network card isn't always present.
thank you
|
|
|
|
|
I have never tried it, but most Intel and AMD CPU's have a instruction called CPUID.
Search google for cpuid and "source code"
Bikram Singh
|
|
|
|