How can I access the raw tcp packet? Any help is appreciated. Thank you. mweiss
mweiss
Posts
-
tcp packet -
Textbox questionI have a TextBox on a Form and I want to implement autoscroll on the TextBox...any ideas of how to do that? Thanks, mweiss
-
Winsock WSANETWORKEVENTSI'm using WSAEventSelect() to register events, FD_READ, FD_WRITE, etc to handle in my program. I have a section of code like: WSAEnumNetworkEvents(pConnect->m_oSkt, *pwsaEvents, &wsaNetEvent) if((wsaNetEvent.lNetworkEvents & FD_READ) && wsaNetEvent.iErrorCode[FD_READ_BIT] == 0) { // do stuff } : : I get an FD_ACCEPT event on the server as I expect and an FD_WRITE on the client as I expect, but when I call send() on the client, I get wsaNetEvent.lNetworkEvents == 0 on the server. I don't understand why it would equal 0. Under what conditions would it equal 0? Any help would be appreciated. Thanks, melinda
-
beginner winsock questionI'm using windows sockets in an application. On both the client and server I use WSAEventSelect() to register the events I'm going to handle. My question is when do the FD_READ and FD_WRITE events get triggered in relation to send() and recv()? I'm confused. Any help is appreciated. Thanks, Melinda
-
Windows socketsThanks for the reply. I found a way to do it without using the windows. I use WSAEventSelect(), WSAWaitForMultipleEvents() and WSAEnumNetworkEvents(). I set up the events in the main thread and in a worker thread wait for events to occur, check which event it was and handle it. I haven't tested it yet, tho. Thanks. melinda
-
Windows socketsThis is probably a very basic question, so bear with me :) I'm writing a console program and need to use asynchronous sockets. I wish to use WSAAsynchSelect(). The second parameter is a HWND to the window you want to handle the messages. The third parameter is the message you want handled. The events are specified in the fourth parameter. What I thought I could do was use a message loop, like while( bRet = GetMessage( &msg, NULL, 0, 0 ) != 0 ) { if( bRet == -1 ) { // handle } TranslateMessage( &msg ); DispatchMessage( &msg ); } and have the WinProc handle the message specified in WSAAsynchSelect(). The problem I'm having is that I get an "Invalid Argument" error (runtime) when WSAAsynchSelect() is called and I think it's because I'm sending a NULL instead of a valid HWND. My question is, does anyone know have advice how to use WSAAsynchSelect() in a console application? Thanks! mweiss
-
beginner stl basic_string questionthanks...i get it now :)
-
beginner stl basic_string questionwould it work the same way if i were copying from one basic_string to another basic_string? in that case i'm not actually using the string. melinda
-
beginner stl basic_string questioni'm using the copy method of the basic_string. i'm a little confused about the first parameter. could someone please post a simple example of copying from one basic_string to another? thanks melinda
-
internet explorer eventsi have an explorer bar that displays a web page (it hosts a WebBrowser control). i want to be able to react to events from the main internet explorer, in particular the navigatecomplete2 event. is there a way to do this? thanks melinda
-
how to get main explorer's urlIt would be helpful to show the route I've been taking: CComPtr spDisp; hr = m_spBrowser->get_Document( &spDisp ); CComPtr spDoc2; hr = spDisp->QueryInterface( &spDoc2 ); CComPtr spWindow; hr = spDoc2->get_parentWindow( &spWindow ); spDoc2 = NULL; spWindow->get_document( &spDoc2 ); CComBSTR bstrParentUrl; spDoc2->get_URL( &bstrParentUrl ); In bstrParentUrl I get a bizarre value like "res//C:\DOCUMEN~1\...." I've tried many other approaches and either get an empty string or this value. Thanks Melinda.
-
how to get main explorer's urli wrote a html control that is hosted in an html page (in an explorer bar). how do i get the address of the page that's hosted in that main internet explorer? thanks melinda
-
showing html in explorer bar-newbie questionI'm replying to my own thread, heh. I could use a HTML control and host it in the explorer bar. Then I could use IWebBrowser2::Navigate() to browse around the Internet because the HTML control has a member CComPtr. I read that I could use the ATL class CAxWindow<>...how do I create that as the host in the explorer bar? Thanks. Melinda.
-
multiple IDispatchesI'm writing a com component that has two interfaces that derive from IDispatch. When I compiled the project I got the error: error C2594: 'static_cast' : ambiguous conversions from 'class CExplorerBar *' to 'struct IDispatch *'. So I changed the COM_INTERFACE_ENTRY to COM_INTERFACE_ENTRY2, so I could specify the IDispatch. Now I have 1 error and 3 warning (I'll just post the error): c:\program files\microsoft visual studio\vc98\atl\include\atlcom.h(1827) : error C2259: 'CComObject' : cannot instantiate abstract class due to following members: c:\program files\microsoft visual studio\vc98\atl\include\atlcom.h(1823) : while compiling class-template member function 'long __stdcall ATL::CComCreator >::CreateInstance(void *,const struct _GUID &,void ** )'. Any ideas about what's going on? Thanks. Melinda.
-
showing html in explorer bar-newbie questionI made an explorer bar using ATL COM. I initially made the explorer bar using the registry entries, but that doesn't meet my needs because I need to do some processing. Does anyone have advice of how I'd show an HTML page in the explorer bar? Any insight would be appreciated. Thanks Melinda
-
explorer barI've created an explorer bar two different ways...one way using registry settings and another using ATL and COM. Both ways show up when I click a button on the toolbar. I want to show an HTML page in the explorer bar. This is easy with the registry settings, but I need to do other processing as well, which I don't know how to do with the registry solution. The ATL COM way I don't know how to get the HTML page to show up but I can do the other processing. My question is: does anyone know either know how to get ahold of the explorer bar that is created by the registry entries so I can do additional processing (if that's even possible)? Or can anyone give me some advice on how to show an HTML page in the explorer bar I've created using ATL COM? Thanks for your help. Melinda