|
Hi Vipin,
if u use these functions in win32 dlls, doesnt it gives errors ? I am sure that it will give errors, since the win32 dlls is not aware of these functions. if possible, could u just explain with exapmle..
|
|
|
|
|
Hi everybody,
How can I monitor a specific port in my computer and determine every single byte sent/received into that port.
Specifically I want to monitor the HTTP protocol port 80, so any program sends or receives data on that port, its data will be visible to me.
Please help me, cause I need it very much
Thaaaaaaaaaaaaaaaaaaaaaaaaaaanx
Mohammad
And ever has it been that love knows not its own depth until the hour of separation
|
|
|
|
|
Deploy layered service providers(LSP).
You can track the statistics then.
Vipin - MVP
|
|
|
|
|
vipinasda wrote: Deploy layered service providers(LSP).
Hello Sir,
Sorry to trouble you, LSP would be very difficult option when you targetting small computer.. also for installing LSP dll you need admin right... Please correct me if i am wrong!.
I believe Hooking Winsock.dll or using Free Ware library like WinpCap would better in this situation!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
|
While i worked on the Winsock
i had a software that is
Etherel
U can install it and put up a filer on
the port 80 and then check the data.
U can also got some code for such software,
i dont remember the link but will forward to
u if i get across it again.
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
Mohammad A Gdeisat wrote: Specifically I want to monitor the HTTP protocol port 80, so any program sends or receives data on that port, its data will be visible to me.
Hook winsock.dll or look for packet filtering library like
WINpCap[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
winpcap as I remember when I last played with sometime back deploys a filter driver. You need install rights for that
Hooking winsock.dll is restrictive. As someone pointed out iphelper apis would help, but it would work only on 2000/XP and above.
LSP works everywhere and is safe for what he is looking for.
Vipin - MVP
|
|
|
|
|
Thanx man, Thanx for your help
And ever has it been that love knows not its own depth until the hour of separation
|
|
|
|
|
vipinasda wrote: LSP works everywhere and is safe for what he is looking for.
But installing and Debugging LSP dll is itself it cumbersome task... hooking would be safe bet as you easily hook and unhook that dll according to your need but for LSP dll you have restart your computer...
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Snort as Packet Sniffer in Linux
-- modified at 0:43 Tuesday 27th December, 2005
|
|
|
|
|
sunit5 wrote: Snort as Packet Sniffer in Linux
Hai, I havn't have idea about Linux ...
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Thank you all for your help
I really appreciate this
Mohammad
And ever has it been that love knows not its own depth until the hour of separation
|
|
|
|
|
Hello,
I got the following compiling error:
c:\program files\microsoft visual studio\vc98\mfc\include\afxtempl.h(86) : error C2679: binary '=' : no operator defined which takes a right-hand operand of type 'const struct PolygonX' (or there is no acceptable conversion)
c:\program files\microsoft visual studio\vc98\mfc\include\afxtempl.h(396) : see reference to function template instantiation 'void __stdcall CopyElements(struct PolygonX *,const struct PolygonX *,int)' being compiled
I am very strange because file "c:\program files\microsoft visual studio\vc98\mfc\include\afxtempl.h" is not a file in my project. How can I solve that?
I am almost exausted by this problem. A lot of thanks if someone helps.
xyhan
|
|
|
|
|
If you put a snippet of your problematic code, someone would be able to help you.
Vipin Aravind - MVP
|
|
|
|
|
Your code is directly or indirectly using a template class in that file. If you could post the piece of code that's causing the error, you could expect more help.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
afxtempl.h is one of the MFC headers. It defines the MFC template-based collection classes: CList , CArray , and so on. Since you didn't directly include it in your code, you are evidently including some other file that does.
The error you listed occurs when an assignment operator has not been defined for a class used as an argument to one of the afxtempl.h classes.
Software Zen: delete this; // <a href="http://www.codeproject.com/script/profile/whos_who.asp?msg=1307432&id=10338#xx1307432xx" rel="nofollow">Fold With Us!</a>[<a href="http://www.codeproject.com/script/profile/whos_who.asp?msg=1307432&id=10338#xx1307432xx" target="_blank" rel="nofollow" title="New Window">^</a>]
|
|
|
|
|
Merry Christmas!Thanks for helps from all of you.
The following is the source code that caused the error. the code is from afxtempl.h.
template<class type="">
AFX_INLINE void AFXAPI CopyElements(TYPE* pDest, const TYPE* pSrc, int nCount)
{
ASSERT(nCount == 0 ||
AfxIsValidAddress(pDest, nCount * sizeof(TYPE)));
ASSERT(nCount == 0 ||
AfxIsValidAddress(pSrc, nCount * sizeof(TYPE)));
// default is element-copy using assignment
while (nCount--)
*pDest++ = *pSrc++; //this line causes error.
}
Here I list the error information again:
c:\program files\microsoft visual studio\vc98\mfc\include\afxtempl.h(86) : error C2679: binary '=' : no operator defined which takes a right-hand operand of type 'const struct PolygonX' (or there is no acceptable conversion)
c:\program files\microsoft visual studio\vc98\mfc\include\afxtempl.h(396) : see reference to function template instantiation 'void __stdcall CopyElements(struct PolygonX *,const struct PolygonX *,int)' being compiled
It seems I did not define the assignment operator of the argument. However, I defined it as the following:
struct PolygonX:public CObject
{
double minAngle;
CArray<cpoint,cpoint> ptArray;
public:
void operator=(PolygonX &src);
};
void PolygonX::operator=(PolygonX &src) {
minAngle=src.minAngle;
ptArray.Copy(src.ptArray);
}
I look forward to more helps!
Best regards,
|
|
|
|
|
I do not know if it is the cause of your error, but operator =() should not return void , it should return a reference to the current object.
PolygonX& PolygonX::operator =(const PolygonX &src) {
minAngle = src.minAngle;
ptArray.Copy(src.ptArray);
return *this;
}
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
Thanks for your help. I tried it but it doesn't work.
|
|
|
|
|
PJ Arends wrote: it should return a reference to the current object.
Could you explain why ?
thank you in advance.
|
|
|
|
|
A good C++ book will explain it better, but the main reason is so that you can chain the operators. ie. one can do
MyObject1 = MyObject2 = Generate_temp_MyObject(); If MyObject::operator =() returned void then MyObject1 would not get assigned the value returned by Generate_temp_MyObject() .
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
|
There are some good example in VB to get the
window title .
But u need constantly check for all windows
title or anyhow get the handle of the window
of ur game .
In VB ur work will be fast , never seen such
code in VC but its possible in VC
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|