Ws2_32.dll Hooking - App That Communicates With A Server
Dec 19, 2008
Basically, I have an app that communicates with a server. I need a way to monitor all the sent and received packets that are being transmitted through the app. I've been killing myself the past two days trying to figure a way to hook into ws2_32.dll to monitor these packets but I can't find a way!
I'm not sure if this is where I should post as to this is my first time on these forums. But, I am creating something that communicates to a server, and on the server part it's giving me troubles, and I am confused on how to fix it. I did rip the code off some where online.The line that I am getting the error "Warning2'Public Sub New(port As Integer)' is obsolete: 'This method has been deprecated. Please use TcpListener(IPAddress localaddr, int port) instead.[URL].. on is this line:
Dim tcpListener As New TcpListener(portNumber) Imports System.Net.Sockets Imports System.Text Module Module1
I am hoping to get some advice on a project that I am wanting to work on. I have never done a web service/windows service or anything along the lines of what I am thinking so I would like some advice from some more experienced developers.I will be using VS2008 and VB.NET. My company currently mostly works in .NET 2.0 for our commercial application, but since this will be used mostly in house I would be able to use .NET 3.5 if suggested (am just not overly familiar with the additional features in .NET 3.5).What I would like is to have a server/service that communicates with multiple PCs. I want to create an application/web page (not familiar with web development so would probably start out as a winform app and possibly move to a web app to consume the service) that would query the web service/remoting service/whatever to retrieve information from each of the PCs (track the version of the application that is running, retrieve log files, push an update program to the PC (to be run manually)).
Not being too familiar with this type of scenario I was thinking something to the effect of:Each PC run a Windows Service that monitored the local PC. When something changes (software update installed?), tell the web service that the new version is installed.A service (web service? remoting server? other?) running on a PC that would be the interface to the windows service (not sure how the web service would talk to the Windows service without the Windows service initiating, though, unless it is also running a server) on the individual PCs. The service could request an update from the PCs (get the software version, request a file). The service would also be able to push an update program to the PCs to be run manually.
I am trying to write an app that communicates with a server that was written in C. Not knowing C at all so i have some problems understanding the messages in c-style struct format that i need to send from the vb.net side.
In my application, I've built an object that communicates with an OPC server and whenever the value of a certain OPC item changes, it logs all the OPC items to a database. This all works beautifully. However, I'm having a problem with disposing of the instances of this class. Whenever I want to remove an instance of this class from the application, I'm dereferencing the object (objDevice = Nothing) and letting GC take care of the rest. I've inserted breakpoints and am monitoring to ensure that the object is dereferenced (it is).
Problem is, even after the object has been dereferenced and is CONFIRMED to be equal to Nothing, the object is still logging data to the database. I'm still trying to get a handle on disposing of objects properly, but most everything I read tells me to dereference and let Garbage Collection take over.
I want to make a program that can communicate with other programs, Like a tcpserver/client.But i don't know where to start. I want the user to be able to submit several urls to pictures on the internet and for other users to be able to view those pictures. How can I do this?
I Have a problem with vb.net. Basically I created an application that communicates via system.net.socket. on the server side of client connect, and a thread checks whether there are new incoming data. if there are data, puts them in a few tread declared variables, together with the "index" of the server. once this is done through "INVOKE" calls a routine that checks the incoming data andperforms an operation based on the data. I'll see what I do not work
Dim returndata As String = System.Text.Encoding.ASCII.GetString(data)
But that does not appear in the texbox, appears only "returndata", the rest c 'is same thing with the messagebox, individually, can display a messagebox with variable,but when I try to make a messagebox that displays them together, the texbox same thing!
And the same thing if I want to compare them with each other, for example
I am using Visual Basic Express 2008 to write an application that communicates with a Digi Watchport/D sensor. This is an IR sensor and I checked the manual for the commands to send to it. In order to get the distance, it say to send the sensor the command D<CR>. Here is my code so far...
Option Explicit On Option Strict On Imports System.IO.Ports Public Class Form1
[Code]...
Every time when i click the button, I get the timeout exception error message.
I want to know how to hook a tcp connection of another program and listen them. I dont need to manipulate the packets though.I just want to record for example chat messages.
I'm working on a tool that requires overlays ala X-Fire. I'm hoping to do it in C# or VB.NET rather than resorting to C++, but the only solutions i've found for .NET cause a large performance hit (~20FPS in games). Take a look here: [URL]
I have been working on a project for some time now and I am stuck. I am trying to sense when a navigation software speaks so i can mute the volume of everything else on the computer.
my problem is that i cant properly sense the audio of the software. i am using windows 7 and vb.net. i have done a good amount of research, but i have not come up with an answer.
i am almost positive that i need to intercept the win32api call of the software to trigger the mute that i will use. i dont know how to do this, all the information i can find that is even close to this subject is for 98, nt and 2k.
does anyone know of any books (or websites) that contain information on this subject?
How can I disable Alt-F4 and Ctrl-Alt-Del?Can I lock all combinations of a key with the Alt key? I got a sample from the internet, it only can disable Alt+Tab, Alt+Esc, Ctrl+Esc, Windows Key
Select Case wParam Case 256, 257, 260, 261 'Alt+Tab, Alt+Esc, Ctrl+Esc, Windows Key blnEat = ((lParam.vkCode = 9) AndAlso (lParam.flags = 32)) Or _
[code]....
Where can I see the button code list in lParam.vkCode = ?How can I make it able to disable Alt-F4 and Ctrl-Alt-Del or disable all combinations of a key with the Alt key?
Is there a way in vb.net to subclass/hooking in to any controls scroll bar and change it is colours etc (I saw this once in C++ but lost it). It�s ok for MS giving us user owner drawn controls, or at the very least allowing us to draw the controls information but it looks dam write awful if the scroll bar does not fit into the GUI.
I play a midi file using this simple win32 api call:
MidiMsg = "open " & c_midiFile & " type sequencer alias mid1 notify" ret = mciSendString(MidiMsg, "", 0, Form1.Handle) MidiMsg = "play mid1" ret = mciSendString("play mid1", "", 0, Form1.Handle)
Callback message MM_MCINOTIFY has a value of &H3B9 (found it using "spy++")I have to know when this message (MM_MCINOTIFY) is fired and read his parameters. In an old version of code I've written years ago in VB6 i had to use CallWindowProc and SetWindowLong win32 api, but now in VS2005 i cannot get it to work.Still I have to try with unmanaged code or are there any other ways to do this in vb .net?
i found an example for hooking global mouseclicks, but i can't get it running.the error is in the start subroutine, -SetWindowsHookEx failed.what am i doing wrong?
Imports System.Runtime.InteropServices
Public Class UserActivityHook Public Delegate Function HookProc(ByVal nCode As Integer, ByVal wParam As Integer, ByVal lParam As IntPtr) As Integer Public OnMouseActivity As MouseEventHandler[code]....
I have been working in an Migration Application where i find out some weird problem , Leave Event Fires twice causing validation to fire twice , hence i want to intercept the events to be processed by application..Hence require help in hooking the delegates so that i can get a list of the events that are to be processed .If anybody can help me out by giving some info or code as how to implement hooking in a textbox leave event/
I am not very familiar with VB.NET so I don't know if this is possible.Some code I am working on is setting the properties of a very large class. In the setter of each property an event is raised to indicate that the class data has changed. An event handler then serializes the instance of the class to a database.Obviously I do not want this to happen after each property is set, so I need to either have a delay before saving, or something else.I am keeping a large list of instances in a cache implementation already, so one option would be to only process the cache every now and then and save all unsaved instances in cache to the database.So I tried to see if I could derive a class from Application (and override DoEvents), but it is NotInheritable, so no luck there.
Has anyone ever come across a way of a way to create an app that kind of mimics what Terminal Services manager does in Windows2003/XP.
I would like to write something that would either go and query a farm of server every n secs a get me a list of users logged in, there process's etc or do maybe type a username in and it goes and finds the user in the farm and returns their details.
I currently have software that sends out plain text(i.e. 'X') to comm 1 port and was wondering if there was any way to capture that plain text and also respond to that port on the same compute as the port without having anything plugged into the machine (i.e. 9 pin serial cable). I am trying to avoid buy any more hardware as this is an objective to acutally cut down on hardware.
I'm trying to hook the keyboard to make some action when I'm running a DirectX application. I want to press some keys like "F2" or "pagedown" when I'm running dx app and see msgbox appears. Can anyone show me the code?
This wont give me an error, but it doesn't happen anything when I mouse down on the Control.
the same doesn't work if I put it in the user control.
Private Sub StartDrag(ByVal sender As Object, ByVal e As MouseEventArgs) Dim Box = CType(sender, Control) Box.Tag = New DragInfo(Form.MousePosition, Box.Location) End Sub
I have been trying to build a game bot in vb.net.One of the main problems is getting access to the text the game prints on the screen so I have been trying to hook the games calls to the windows api drawtext and textout functions.I have been hunting for examples of how to set up a hook in vb.net for a long time without any luck.I have found it impossible to translate examples in old school vb, C++, and C#.For convenience's sake I would like to use the freely available deviare and/or easyhook libraries.
Im making an application that is keeping an eye on an external application that does not have an API. I'm interested in getting notified when the external application changes its main window title. My idea is to somehow register a hook that will notify my application.
how to make program for hooking/inject .dll file into main.exe I want to make 1 program to inject/hook .dll file to main.exe fast . Its about the game MU Online.
I am using stored procedures in my application using vb.net, while executing stored procedures on mysql database server thru application, the response time from the server is more. Is there any settings that i need to set on mysql db server or any changes in connection string or in code.
I have an application I have developed which works great on individual PC's. However I've had some interest from a few customers that asked if I have a network version for site licencing.If my app did not save any data or write any reg entries, this might have been ok. But it does to the local computer. I also built in my own copy protection and trial function that stores data in the registry on the local computer.What would I need to do to enable my application to run on a server/network share, so that the only a serial number needed is for the server?
I have a server which has around 300+ users on it. Though the problem is that its coded in VB6, and if somebody has a bad ping, everybody has a bad ping. I need a tunneling server which will tunnel the incoming and outgoing connections and make there ping appear to be 0 in the server. Client to Server, Server to Client.
i'm tying to send email in my application directly by the smtp server but the server doesn't allow me to do that.The application its used by everyone in the company, so i set the smtp client UseDefaultCredentials to True, but the server replies with this when i try to send an email:[code].....If i set the credentials by hand, the server sends the email. So my problem is how to make this work to everyone? I don't want to have one public/friend var all time in the application with the credentials of the current user?