|
|
hi
I want to spy all packets that my computer recieving from internet or network ,
are there any one help me and have a sample code ?
thanls alot
|
|
|
|
|
go to http://winpcap.polito.it for more details !
|
|
|
|
|
I have an app which start up another exe file at some point and what I am looking to do is have the newly opened program close down the program that started it. Is this possilbe to do without closing both programs? Win32 please.
|
|
|
|
|
|
I get this error for many different symbols and it says that they are already defined in func.obj
func.obj is a self contained file that does define these vars, but isn't used or call be the ones that the error is generated from.
So basically I have func.cpp that defines x then I have func1.cpp and it defines x. These are local to their files why would I get this error?
Thanks for the help
|
|
|
|
|
Because they're global in scope, the linker detects the duplicate symbol "x".
/ravi
Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
jimNLX wrote:
These are local to their files
but linker puts these files together
|
|
|
|
|
Make them static to force internal linkage.
eg:
-- func.cpp --
static int x; // internal linkage, global to func.cpp only
-- func1.cpp --
static int x; // internal linkage, global to func1.cpp only
“Our solar system is Jupiter and a bunch of junk” - Charley Lineweaver 2002
|
|
|
|
|
&Hi,
How can i decode dtmf signals from telephone line? TAPI doesn't meet my requirements, there're circuits that decodes dtmf signals but i want to implement it on PC with software.
|
|
|
|
|
|
I recently reinstalled windows and Visual Studio 6. I almost forgot how fiddly it is to install all the SDK updates and all that. Now i finally managed to get it all i think but now when i try to compile any of my projects i get the following error:
c:\program files\microsoft visual studio\vc98\include\oleidl.h(5059) : fatal error C1021: invalid preprocessor command 'end'
Does anyone know how to fix this
Btw, the SDK update program installed the Windows 2003 server SDK and i'm running Windows 2000 professional (even though i don't think this has anything to do with it cause the include file is not in the updated SDK directory).
Kuniva
--------------------------------------------
|
|
|
|
|
You can probably just open up oleidl.h and replace #end with #endif, like maybe oleidl.h got corrupted somehow. Or if that solution worries you, just reinstall VC6 again.
Chris Richardson
|
|
|
|
|
Anyone know of a JAXB package that spits out C++? I'm looking for an alternative to manual development of C++ classes from an XML schema.
I've found one on SourceForge but it doesn't seem to be mature. I was wondering if anyone knew of an Apache or IBM/AlphaWorks C++ implementation.
Thanks!
/ravi
Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Hi, this is my first post on the forum, my name's Florian and I'm from Switzerland (where they make the cheese
Right now I'm beginning DDraw with c++ (where I'm still quite a beginner too), and I have started writing a DDraw class, a wrapper of a sort, to facilitate casual operations. One of the member functions is a function wich takes a LPDIRECTDRAWSURFACE7 as a parameter and should create a offscreen surface & point to it with the given LPDIRECTDRAWSURFACE7. But somehow it doesn't work, because when I check the pointer after having used the function, he's always invalid.
Here's the code:
<br />
<br />
ENUM_RESULT CDDraw::CreateOffscreen(int iWidth, int iHeight, bool bKey, LPDIRECTDRAWSURFACE7 lpSurface, int iMemFlags)<br />
{<br />
memset(&itsDdsd,0,sizeof(itsDdsd) );<br />
itsDdsd.dwSize = sizeof(itsDdsd);<br />
<br />
if(!bKey)<br />
itsDdsd.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT;<br />
<br />
else<br />
{<br />
itsDdsd.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT | DDSD_CKSRCBLT;<br />
<br />
itsDdsd.ddckCKSrcBlt.dwColorSpaceLowValue = itsTransColor;<br />
itsDdsd.ddckCKSrcBlt.dwColorSpaceHighValue = itsTransColor;<br />
}<br />
<br />
itsDdsd.dwWidth = iWidth;<br />
itsDdsd.dwHeight = iHeight;<br />
<br />
itsDdsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | iMemFlags;<br />
<br />
if(lpSurface)<br />
{<br />
lpSurface->Release();<br />
lpSurface = NULL;<br />
}<br />
<br />
if(FAILED(itsLpDD->CreateSurface(&itsDdsd, &lpSurface, NULL) ) )<br />
{<br />
return(VID_ERR_CREATEOFFSCREEN);<br />
}<br />
<br />
return(OK);<br />
}<br />
All the "its*" variables are class variables (of CDDraw), and I try to create the offscreen surface in another class, CMain, wich contains an instance of CDDraw ("itsVideo"), and a LP to a DD surface, "itsSprite". What I try to do looks like this:
<br />
itsVideo.SetColorKey(255,0,255);<br />
<br />
if ( (itsResult = itsVideo.CreateOffscreen( <br />
64,64,true,itsLpSprite) ) != OK)<br />
{ <br />
itsError.ShowMessage(itsWin.GetHwnd(), itsResult);<br />
}<br />
<br />
if(!itsLpSprite)<br />
{ <br />
itsError.ShowMessage(itsWin.GetHwnd(), itsResult);<br />
}<br />
And each time, I get an invalid surface...
Any advice/criticism (I'm sure there's alot to critic is welcome...
|
|
|
|
|
i'm trying to convert a string to a double without losing precision. for example, let's say you a string "0.070" and i want it to convert to double. so, i pass it into atof() and i get a double with a value of 0.069999999. how can i get the double to be 0.070? i tried to round the result of atof() to the number of decimal places, but that didn't help. anyone have any ideas?
thanks.
|
|
|
|
|
Some numbers just won't convert, it's to do with representing them in binary rather than decimal. That's why they're described as 'floating' point numbers, or double precision f.p. numbers. Doubles aren't any more precise, but they can accomodate a larger working range.
If you can handle a fixed number of decimal places, you might want to use large integers instead (__int64) with a fixed divisor, like 1000, but this obviously depends on what range you're dealing with. The OLE CURRENCY type does something along these lines.
Steve S
|
|
|
|
|
hello, i have writen a winsock aplication using visual c++. i have wrote a new non mfc class to handle a recv thread in my program. the problem is i need to access some of the varibles from my original mfc class,the varible i need to write to is a static text CString.
the varible was declared with the class wizard wich aut:-Domaticaly assighned a varible to the static text id.
is there a way i can access this varible from my new non mfc class,or would i have to declare the CString as global?
if so how would i go about this?
thankyou in advance
chris
|
|
|
|
|
Are you wanting read access (in which case you could just use an LPCTSTR), or write access? If the latter, then you've just put in a dependency on MFC in your shiny new class...
Steve S
|
|
|
|
|
Steve S wrote:
If the latter, then you've just put in a dependency on MFC in your shiny new class...
Couldn't CString::GetBuffer() be used to "pass" the buffer to the other thread?
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
[fx:blush]
Yes, of course it could.
Steve S
|
|
|
|
|
hmmm well its definatley the latter,im trying to update the string with new information obtained from my server,but becouse im stuck in my "shiney new thread class" i cant seem to write from my inBuffer wich is in my thread class to my varible..
this is very annoying coz i cant use functions like UpdateData(); from my new class either.
thank you for your speedy response & any further help would be much appreciated.
thanks again
chris
|
|
|
|
|
Sounds like you have a CString in your dialog class which is being used by DDX_Text. If you want to update the data, you could use SetWindowText instead, which means you'd need the window handle for edit control instead of the CString.
Steve S
|
|
|
|
|
hahah thank you very much,i have sorted my problem now!
cheerz m8;)
chris
|
|
|
|
|
Hi,
One of my beta testers told me about preparing a build with debug statements being logged in a text file. I'm trying to find a fix for a bug with Exchange Server that I cannot reproduce and I guess that being able to see in a file what happened would be tremendously useful.
I do not, however, know anything about that sort of thing... Anyone can help me out?
Thanks!
---------------
Tired of Spam? InboxShield for Microsoft® Outlook® 2K/2K2/2K3
http://www.inboxshield.com
|
|
|
|