|
Not sure if this helps but it's worth a try.
<br />
Public Function SetUpWS() As EmpInfoWS.EmployeeInformation<br />
Dim wsEmpInfo As New EmpInfoWS.EmployeeInformation<br />
wsEmpInfo.Url = GetEmpInfoWSURL()<br />
wsEmpInfo.Credentials = System.Net.CredentialCache.DefaultCredentials<br />
Return wsEmpInfo<br />
End Function<br />
Jason W.
|
|
|
|
|
|
Here is what netstat is showing.
<br />
TCP COMPUTERNAME:4483 111.111.111.111:https TIME_WAIT<br />
TCP COMPUTERNAME:4484 111.111.111.111:https TIME_WAIT<br />
TCP COMPUTERNAME:4485 111.111.111.111:https TIME_WAIT<br />
TCP COMPUTERNAME:4486 111.111.111.111:https TIME_WAIT<br />
TCP COMPUTERNAME:4487 111.111.111.111:https TIME_WAIT<br />
TCP COMPUTERNAME:4488 111.111.111.111:https TIME_WAIT<br />
TCP COMPUTERNAME:4489 111.111.111.111:https TIME_WAIT<br />
TCP COMPUTERNAME:4490 111.111.111.111:https TIME_WAIT<br />
TCP COMPUTERNAME:4491 111.111.111.111:https TIME_WAIT<br />
TCP COMPUTERNAME:4492 111.111.111.111:https TIME_WAIT<br />
Jason W.
|
|
|
|
|
|
Cool, is there a site that tells about the socket status options. I need to point my manager to it so he will get off my back. Thank you for the help.
Jason W.
|
|
|
|
|
|
Trust me I would love to tell him that, at this point I can't however.
Jason W.
|
|
|
|
|
|
|
|
|
|
If it isn't a problem I would like to pick your brain a little more. I found an article that says 'The side shutting down the connection gets the TIME_WAIT.' is this true. If it is then I don't need to worry about causing a denial of service on the server. Thoughts?
Jason W.
|
|
|
|
|
I need to create a program that can simultaneously turn on up to 4 timers that do not control events, but simply record time down to at least a hundredth of a second. This timer must be visibly updated every hundredth of a second on a form to inform the user of the duration of the processes the program is performing. Is there a way to do this in C#? I looked into the Timer control, but can't figure out how to make it work for this purpose.
|
|
|
|
|
Use the Interval property of Timer control to set the time interval after which you want to initiate some action. For example:
Timer.Interval = 10;
Then use the Tick event of the Timer control, which will then fire after every time interval set by you as above. In the event-handler of Tick event, use code to update time in the window as per your requirements.
For example, override the OnPaint method of your window or control where you want to show time and use Graphics methods (Pen , Brush , etc.) to show the actual time. Then in afore-mentioned Tick event-handler, simply use a command like this.Refresh() to refresh the window which will call the OnPaint method to draw / show the updated time after every time interval set by you.
Regards,
Ashok Dhamija
_____________________________
Padam Technologies
|
|
|
|
|
Contrary to what Ashok told you, DON'T use the Timer control. It's resolution is not guaranteed below 15 milliseconds.
You have a couple of problems...
First, are you going to be able to repaint your data every 10 milliseconds AND monitor your process? Not likely. Repainting is slow...
Second, To get the time resolution you want, you really need to use a high resolution timer that is accessed through the QueryPerformanceCounter API. Search the articles for "high resolution timer" and you'll find a bunch of examples and class libraries demonstrating this.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have a plug in object that i use in my application
I have 2 interfaces for plugins
IPlugIn
{
}
IMyCompaniesPlugIn:IPlugIn
{
}
when I load a plugin (via Reflection) i want to check whether it is of type IMyCompaniesPlugIn so i can do different stuff for 'known' Plugins
how do i do this test? I can test for any amount of inheritance, but i don't seem to be able to do the same for implementation
Thanks
Russ
|
|
|
|
|
|
thanks
if (myType.GetInterface("MyInterface") != null)
{
}
works perfectly, thanks
Russ
|
|
|
|
|
How can I detect which threads are running inside the application?
I need to know this so I can make a work-around for a deadlocking threads.
I don't have any sourcecode whatsoever of the component I am using, and ofcourse: That component is causing the deadlock. Is there any way I can find the threads it's using and kill those before I quit the application?
WM.
What about weapons of mass-construction?
|
|
|
|
|
Solving deadlocks is not a simple situation especially when details are sparse. The best advice I can give is whenever you are dealing with a 3rd party component not under your control that you suspect is not thread safe, you will need to isolate it in your code. This could end up being complex (dependent on the component) or it could be as simple as anytime you access/manipulate the component put a lock around it. Once your application only touches the flakey component in a thread safe manner some of the flakey behavior that leads to deadlock should go away.
I am hesistent to mention this but if you want a list of threads for a given process, look in the System.Diagnostics.Process object. There is a member Threads which should give a ProcessThreadCollection which you can enumerate over.
|
|
|
|
|
In this case it's a user interface component, that is being used very often. But I think I solved the problem, by calling Application.ExitThread() these somehow kills the threads of the flakey component during shutdown.
WM.
What about weapons of mass-construction?
|
|
|
|
|
Hi,
I have a class where i'm creating a ButtonArray. Once i have created some elements in this array i want to access each of them in order to move them around in a panel. However i can't seem to get the information from the Move() funtion to be used in the MouseUpHandler which is the one handling the release of a button press (dropping the button at a new location).
Could anyone please help me out here, and please do say if you need more code than i have provided.
public void MouseUpHandler(object sender, System.Windows.Forms.MouseEventArgs e)
{
this.Move((System.Windows.Forms.Button) sender).Tag), host, _iXCoorRelative, _iYCoorRelative);
}
public void Move(object sender, System.Windows.Forms.Control host, int _iXCoorRelative, int _iYCoorRelative)
{
ButtonArray btnArray = new ButtonArray(host);
btnArray[Convert.ToInt32(((System.Windows.Forms.Button) sender).Tag)].Location = new System.Drawing.Point (_iXCoorRelative, _iYCoorRelative);
}
|
|
|
|
|
Why does it "seem" like you can't get the information? What happens?
Where do you declare the host, _iXCoorRelative and _iYCoorRelaive variables, and where do you specify the values for them?
You send the contents of the Tag object of the button as sender to the Move method, then you reference the contents as a Button object. Do you really store a reference to a button in the Tag object of the button?
---
b { font-weight: normal; }
|
|
|
|
|
How it is possible to load and read .gif, .jpg, .bmp, .png, .mpeg and other files can i open and read in my application divx files?
Is there a free loader dll or similar?
|
|
|
|