|
|
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> If it doesn't matter, it's antimatter.<
|
|
|
|
|
BadJerry wrote: COleDateTime
I believe, what ever COleDateTime do is well documented here [^]and available free on net.
I am not aware if xcode support ATL, if yes, you can still use it!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hi,
I have a simple sockets server.
It consists of a CAsyncSocket socket with which I accpet requests. Then I create per each source a thread, attaching to it a socket which keeps the connection to my client.
I use the regular socket callbacks like: OnConnect, OnReceive, etc.
The problem is that out of, lets say, 1000 requests, there are about 1% missing. With wireshark it seems that the requests arrives to my server pc, but on OnReceive I don't see any evidence of that.
OnRecieve() basically has CAsynSocket::Receive() and queus any packet that is received.
Also , CAsyncSocket::Receive() uses a large enough buffer for all possible requests.
Any advise would be blessed.
Thanks.
|
|
|
|
|
This is impossible.
TCP is guaranteed not to behave like that.
I did many of such tests like in : http://www.pushframework.com/?page_id=435[^]
and no data is lost.
Note that in TCP, if a packet is lost, it is resent and if the process repetitively fail, the whole connection fails.
Push Framework - now released !
http://www.pushframework.com
|
|
|
|
|
He never says he's using TCP... he said socket... there's other types of sockets such as UDP that do not guarantee the data, but since the data isn't guaranteed anyway, this shouldn't be a shock.
|
|
|
|
|
Actually it is implied because with UDP you do not use Create and Receive, he also mentions keeping a connection which you do not do with UDP as it is a connectionless protocol.
|
|
|
|
|
You still establish a socket... you just don't go through a connection with the external client or server...
|
|
|
|
|
I know that you still establish the socket I meant to type that he stated he was using connect and accept which implies that he is using TCP not UDP.
|
|
|
|
|
You meant... but you typed create and receive instead....
|
|
|
|
|
I ran into something that looked like this when doing TCP Sockets from Windows to non-Windows (Linux, AIX, HPUX, and others).
There is no guarantee that there is a 1-1 correspondence between send() and recv() (or the OS equivalent). This is especially true if different buffer sizes are used or variable length messages are sent.
The OS is allowed to buffer up the data and send it at one time and the receiver can do a read and get multiple messages into the buffer, even partial messages to fill up the buffer, leaving the rest for the next receive.
Basically, you have to control the "message framing" to locate and separate the start of each incoming message.
Now this is generally not a problem for "command / response" protocols, that is, one program does the send and then does a receive to get the response. This way, each end of the socket is doing a synchronized handshake, one message going out, one message coming in. But if you have an application where you send lots of data first, or receive lots of output, then you might be looking at "lost data" because you are receiving the data from multiple "sends" with one "receive".
Anyway, by doing my own message framing and reassembly, I was able to avoid this possibility.
|
|
|
|
|
don't use the BHO
only use the API HOOK
for example:
i use Internet Explorer Open the web page : www.google.com
and the i have to use API Hooking interception this URLs ,
next modify that URLs "www.baidu.com"
how?
i was hooking the "send" funtion and "getaddrinfo"
but it's not used.
give advice or comments
thk...!!
|
|
|
|
|
6784746 wrote: give advice or comments
Try using Spy++[^] to find out which calls are being made by the browser.
|
|
|
|
|
You could try subclassing the edit field the user types the URL into, intercept the WM_GETTEXT[^] and WM_GETTEXTLENGTH[^] messages and modify the URL accordingly. If this would suit your needs or not is a different story. Another aproach could be to write a trtansparent proxy or modify the hosts file. Google these up if you don't know what i mean.
On a sidenote, redirectig the user from the actual page he wants to visit might not be a nice thing to do...
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> If it doesn't matter, it's antimatter.<
|
|
|
|
|
I need to extract animated gif frames to related bitmaps, and info of offset, transparent color of frames.
CxImage (7.02) contains many errors for animated gif,
ZLib is too complex, and I am not sure if it works with most (or all) animated gif formats.
I found other samples, such as AnimationGif, on this site, but they don't work with many (odd ?) animated gifs (IE and FireFox can display them well).
Do you know where I can find C++ source code for this purpose?
Thanks for links.
|
|
|
|
|
Can't CxImage[^] help you?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> If it doesn't matter, it's antimatter.<
|
|
|
|
|
Does MFC not have a built in collection for signed integer arrays, similar to CUIntArray and CDWordArray but for signed?
I need to have signedInt array as a member of class to be passed around as member of the object. The only way I can think of is by making arr as a member as in, int *arr = new int[], and release memory in destructor?
Anybody?
|
|
|
|
|
|
good point, I assume there is no problem mixing up MFC with stl. All I need to do is probably expose std namespace. Thanks, will try it.
|
|
|
|
|
Just add in exactly what Chris has in his post. You do not need a using statement because what he wrote is fully qualified. You just need to include the appropriate header which I think is <vector> without the .h.
|
|
|
|
|
Hi, dear all,
I have a C++ project created in VS2003, now I need to create another project based on it, but need VS2008.
I open this project from VS2008, and the system did some conversion for it.
After did some small change about it, the project can be built in VS2008, but when I run it, get exception.
For example, my application class named as XXXXXApp (file name is XXXXXApp.cpp), the resurece file name as XXXXXAPP.resx.
System::Resources::ResourceManager * resources = new System::Resources::ResourceManager(__typeof(SHXStiffLibNet::SHXStiffLibApp));
this->AppImageList->ImageStream = (__try_cast<system::windows::forms::imageliststreamer *="">(resources->GetObject(S"AppImageList.ImageStream")));
the GetObject() call causes the error.
I open the .resx file and I can see the "AppImageList.ImageStream" node is there, but why cause exception?
Thanks!
|
|
|
|
|
What's the error? That's a .Net class, make sure you have the compiler configured for C++/CLI.
It's probably some sort of configuration problem. Closely compare your VS2003 project configuration to your VS2008 project configuration.
|
|
|
|
|
Thanks for reply,
The error message is:
Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "XXXXXApp.resources" was correctly embedded or linked into assembly "ProjeceName" at compile time, or that all the satelite assemblies requried are loadable and fully signed
How can I check it? is XXXXXApp.resources a physical file? I cannot see it?
|
|
|
|
|
|
I've never seen this problem before... but then again, I don't work with .Net regularly.
|
|
|
|