Strictly speaking yes, I can simplyfy things and open a TCP client using .Net, howvever I was planning to implement my project with another final year project at a later stage, concerning TCP congestion control algorithims. This requires read and write access to the whole TCP layer, including the header.
So IDEALLY I stick to raw, but if nothing pops up I will have to do without.
Ok things are beginning to get clearer in my head now. Is WSACancelBlockingCall called by you or (as it appears) is fired from another program, i.e. this MS-9015 (wrong number I thing) thingy.
My first suggestion would be to if possible isolate the area of the network you're concerned with (i.e. don't connect it to the internet just have ideally two computers (or one with using the loopback interface) on the network. Then try the code while turning off all the network systems, i.e. firewalls, antivirus etc until you get to the one which is hopefully causing the problem. Once this has been established then we can delve further for a work-around.
Im not sending any WSACancelBlockingCall, so I assume this is due the update, at least this site lead me to think so: "http://www.microsoft.com/technet/prodtechnol/winxppro/maintain/sp2netwk.mspx#".
Good idea though, I will experiment Raw Sockets on my lan. Luckily I already got over the lan side by using an NDIS driver..and succesfully sent and received TCP over IP over Ethernet, and all other protocols. As regards firewalls and antivirus, I never had any of those.
So when you say you change the header to 6 representing TCP do you mean you do that to every packet or only TCP packets? You cannot change a UDP or most other packets to TCP. Make sure that isn't the case.
Im refering to the protocol field in the IP header. These are represented as
- 0: Reserved
- 1: Internet Control Message Protocol (ICMP)
- 2: Internet Group Management Protocol (IGMP)
- 3: Gateway-to-Gateway Protocol (GGP)
- 4: IP (IP encapsulation)
- 5: Stream
- 6: Transmission Control Protocol (TCP)
- 8: Exterior Gateway Protocol (EGP)
- 9: Private Interior Routing Protocol
- 17: User Datagram Protocol (UDP)
- 41: IP Version 6 (IPv6)
- 50: Encap Security Payload for IPv6 (ESP)
- 51: Authentication Header for IPv6 (AH)
- 89: Open Shortest Path First
I change it to 6 when the TCP layer contains TCP data, and this is correct as I am forwarding it directly from another user, and shows up correctly on Ethereal. As I mentioned before the problem is probably due to the Windows Update as seen on "http://www.microsoft.com/technet/prodtechnol/winxppro/maintain/sp2netwk.mspx#E5AAE"
If you can get a reference to the Element which represents the image then I think you might be able to get it by using a method named something like GetAttributeValue (sorry I can't remember it exactly of the top of my head), if you call this with "width" and "height" as parameters I think you can get the height and width of the image (not the original image size but the size of the displayed image on the page).
You are correct: use the HtmlElement class and GetAttribute() method to get the image size with width & height as parameters. However I was referring to the "file" size (in bytes) of the image file. I know IE stores the webpage files in "Temporary Internet Files" folder as local cache but somehow programmatically it (OS?) does not allow the files to be read. However you can manually see these files using Windows Explorer.
Thanks. You are correct. My dilemma is I'm using WebBrowser control first to navigate to the webpage to get all the images names via HtmlDocument/HtmlElement classes. If I use WebRequest/WebResponse, I'm essentially doing two requests from the server. I'm thinking if there a way to just do these things once. I don't have to use WebBrowser control but it helps in easily parsing the desired attributes.
Appreciate your help. Things are looking up!
BTW: I tried accessing a local image and I got a "401" not authorized error message.
Unless you already know the uri of the image/file you want to get the size of you cannot make it in one request because you have to have one to find the location of the file (i.e. a request to the html file to find the image path) and then a request to the image file for the file size.
I agree. Another way I thought I could do was to read the image file info from the Temporary Internet Files folder but I can't use the FileInfo class since XP does not seem to allow any file in that directory be read except desktop.ini. If I can circumvent this that would resolve the issue.
Not really, apart from that my view of accessing the Temporary Internet Files is a bad idea on the whole. There are too many ifs and buts.
The thing which I should be improved is trying to eliminate the WebBrowser if you're simply using it for accessing the html to get the filename and not actually displaying it because my guess it'll be very resource hungry.
If you know that the image paths will be specified in the html page then it'd probably be more efficient to make a WebRequest or use WebClient to "download" or read the file and then use a simple parser or regular expressions to extract the image file, this way you're not creating a UI control and then not displaying it.
Hey guys, I have to tables and I want to make a selection from both tables
Table 1: Customer >> Name and number (my main table)
Table 2: Order >> Order
with the select command i select them, not I want to show it in DataGridView, but i can fill data gried with one table DataGridView1.dataSource = MyDS.Tables["Customer"];
but when I fill in the DataGridView, It authomatically adds the new Row from Order Table(i want to change the header but its not possible because it brings it driectly from database).
I used this command to add a column in my dataSet MyDS.Tables["Customer"].Columns.Add("Order");
what I dunno how to do this, to show the data in the column Order from Order table in my new Column that I have created.
You're being a little vague, so hopefully I'll be able to get some clarification. Are you trying to join two tables and then display the resulting join in a DGV? If so, can you give us the query string that you use to retrieve the data. Also, have you stepped through your code and ensured the query returns what you want?
I was wondering if it would be possible to implement a LinkHover event on the rich text box control. It already has a LinkClick event, but no facilities to offer a tooltip on LinkHover. I'm assuming it is possible, as on mouseover a link the cursor changes, but i'm guessing it will need some COM work.
Last Visit: 31-Dec-99 19:00 Last Update: 6-Feb-23 3:22