|
Dear,
Please help me, How can i get the details of the network connections in a win2k server, such as username,computername, open files, ip address of the computer connected etc. using Visual Basic 6.0. Please send me if there is any components in win2k OS.
|
|
|
|
|
At most, you can get the shares on the machine and which users are connected to them. The rest of the information isn't available anywhere in the Win32 API.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dave Kreskowiak wrote:
The rest of the information isn't available anywhere in the Win32 API.
Not to sure about that. Take a look at the utility on Win XP called 'openfiles'. It seems to do just about what he needs. Not sure if it is there in Win2K but worth a shot. More over, if the utility can get the data then there has to be an API to get it.
Perhaps using this in combination with the output from a netstat can be a help.
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Jörgen Sigvardsson wrote:
If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.
My Blog[^]
|
|
|
|
|
I have made a class wich I use to make logins from my applications...
My question is ... Can I raise an event with log-info?
Want a listbox on my form to show login info; "Connecting to databse ... ", "Trying to login ....." etc.
I want an event in my class to give my application this info during login.
Is it possible?
//Maw
|
|
|
|
|
I think It'd completely done. To do that, you put the RaiseEvent statement in the event "paint" ,etc. of the ListBox containing the log information. Thus, when you want to fire this event , you only refresh that Listbox.
For instant:
when you add into the ListBox a new item, you call the "invalidate" method of the ListBox. Because you already caught the event you want to create in the "Paint" event, that event automatically trigger.
<vtalau>
|
|
|
|
|
well .... it's the other way around =))
I want to raise an event that will fill listbox with information on my login-form... Login form is creating clsLogin and calls function tryLgoin(). tryLogin() raises an event with information. loginform is listening on that event an when it occurs it adds a row in listbox with info.
How is that done?
//Maw
|
|
|
|
|
|
Anyione can tell me the easiest code of threading. Including functions as CancelThread etc.
Maybe a nice class somewhere?
//Maw
|
|
|
|
|
The .NET framework offers a ThreadPool class, you should use it.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
You know a nice tutorial?
//Maw
|
|
|
|
|
|
Well a nice class is definitely a start in the right direction. But if you want to use threading, you need to learn enough about it to actually do so - and a good way to start is to write your own class, rather than look for one.
As far as the NET documentation, let me make an analogy.
Suppose I had a 9mm and an ingrown toenail, and suppose further that the only understanding of either I had came from a NET Walkthrough. Now, armed with this impossibly limited knowledge and some of my own basic cognitive ability, I might just put 2 and 2 together and decide that sitting down at my kitchen table and blowing away my big toe was actually a pretty reasonable way to combine my limited knowledge of a problem and a tool to achieve a "solution".
Now, assuming a I got very lucky, and all that was missing was my big toe, I would immediately realize that the MSDN never explained about how much a 9mm recoils, and that I was damn lucky I did not accidentally fire a second shot that either blew my head off, or worse still, blew my goober off. And it would only be upon further investigation that I learned that after taking off a big toe, a 9mm round would also penetrate the nearest wall leaving an entry hole about the size of a quarter and come out on the other side leaving a hole I could easily stick my head in. etc, etc, etc.
The moral of the story is you'll need a lot more than just an article. You'll need to look at a lot of example code, and more importantly experiment on your own a lot.
Cancelling a thread is a perfect example. The Threading class provides an Abort method, and sure, that will work - but only if you are doing something equally useless like a typical walkthrough that calculates prime integers.
If a real-life thread is not using something like db resources, file system resources, printer resources, etc. then you probably should not be using a thread in the first place. So any real app needs to terminate threads in a controlled manner. Usually a primary thread sets a flag that tells a worker to cancel a task. Only you can write the appropriate code because only you know what your thread is supposed to do, when the appropriate times are this it should check it's cancel flag, and how it should clean up after itself.
Threading is a journey, not an article...
|
|
|
|
|
Dear All Engineer,
Anybody can tell me how to create a registry during the Setup deploying time? I want the User can select which database folder they want to keep.
The example is create a windows registry folder as "HKEY_LOCAL_MACHINE\SOFTWARE\CompanyName" with
Name = "Database Folder"
Type = "REG_SZ"
Data = "C:\CompanyName\Database"
|
|
|
|
|
|
Dear ToddHileHoffer,
Thanks a lot.
|
|
|
|
|
Hi folks,
With VBCommenter i commented my source code from a project, that works fine.
But i don't get intellisense info from the classes etc in the same project that i am working on.
The same problem occurs with other projects in the same solution that referenced this project.
When i reference the dll instead of the project, intellisense works fine.
But then you get other problems (ambiguous classes, etc).
Does anybody have an idea?
Thanks...
|
|
|
|
|
Hello all,
I have ddlA that loads another ddlB on a postback. I AM Able to get ddlA to load in the page load event;however, i can not get the ddlB to load from the selected value from ddlA.
Can someone please help me with this.
* I am very much open to all solutions for this issue. IF YOU have a better way or an easier way of doing this, by all means, please share it with me!
Erik.
Code===============================================
'
'GO NOW!
'
Protected Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Not IsPostBack Then
Customers()
End If
End Sub
'
Private Sub Customers()
ddlCustomers.DataSource = GetData()
ddlCustomers.DataTextField = "CompanyName"
ddlCustomers.DataValueField = "CompanyName"
ddlCustomers.DataBind()
End Sub
'
Private Sub LoadList()
ddlCompanyName.Items.Clear()
ddlCompanyName.DataSource = GetData(ddlCustomers.SelectedValue).CompanyName 'ado.net query
ddlCompanyName.DataBind()
End Sub
'''''
'...Northwind
''''
Function GetData()
'
Dim cnn As New SqlConnection("data source= desktop; initial catalog= northwind; trusted_Connection=yes")
'
Dim cmd As New SqlCommand("SELECT * FROM Customers", cnn)
cmd.CommandType = CommandType.Text
'
cnn.Open()
Dim result As SqlDataReader = cmd.ExecuteReader(CommandBehavior.CloseConnection)
Return result
cnn.Close()
result.Close()
End Function
'
End Class 'STOOOOOOOOP!...
===============================================Drop Downs.................
| | <asp:dropdownlist id="ddlCompanyName" runat="server" autopostback="True"> | | Company Name | | Customers | <asp:dropdownlist id="ddlCustomers" runat="server" autopostback="True"> |
|
|
|
|
|
I don't see any code that attempts to load the second list - could you point it out for me please ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
That is where i am getting stuck. I thought that this is where the second ddl should load.
Private Sub LoadList()
ddlCompanyName.Items.Clear()
ddlCompanyName.DataSource = GetData(ddlCustomers.SelectedValue).CompanyName <---HERE...
ddlCompanyName.DataBind()
End Sub
I am still working on and off with this tring to get it to work, or get some information that can explaing how to implement something like this. IF You know of a good url please send it my way. i need to find the answer to this one before to long...
Erik...
|
|
|
|
|
Erik Lirttle wrote:
ddlCompanyName.DataSource = GetData(ddlCustomers.SelectedValue).CompanyName
I'm not sure what the .CompanyName property is supposed to do here, but a getdata function that takes the selected value and filters on it is the right idea.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I want to make a program which doesn't allow any how to go focus out of him not even the mouse cursor goes out the window and I even want to trap the message ctrl+alt+del,so that my process can't be killed.
|
|
|
|
|
There are more ways to stop a process than just pressing Ctrl+Alt+Del. Perhaps if you tell us why you want this functionality there may be a way to do something just as well but with a different solution. I know I'd feel pretty irritated if I used a program that forced the focus to it and didn't allow me to stop it running - the only reasons I can think of that you'd want to do this are not good reasons.
My: Blog | Photos
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
|
|
|
|
|
While this may be a good idea for a kiosk application, it's just plain idiotic to do it in any other circumstance.
Also, you can't trap Ctrl-Alt-Del, unless, that is, you want to write a new GINA.DLL...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I want to hide my executing process in task manager.How can I?
|
|
|
|
|