|
So you want to test MessageBox on every thread you run?
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Hello,
Any idea to create a synchronisation beetween processes running on 2 (or more) computers, as a semaphore IPC ?
Someone suggests me :
- locking record in an SQL database
- file on a shared filesystem
What else ?
Thanxs
/SGA
|
|
|
|
|
SGAYET wrote: create a synchronisation beetween processes running on 2 (or more) computers
synchronize what? Perhaps I'm wrong but that seems significant to me.
|
|
|
|
|
I need a mutual exclusion beetween processes running on different computers.
Explanation :
I have a program querying web services. It is running on 2 computers for load balancing and fault tolerance. The 2 processes are doing the same things, so i need to ensure anything done by one is not redo by the second.
Thanxs
|
|
|
|
|
Wow. That is not an explanation.
- "doing the same thing"
- "querying web services"
What things, why, when, how? How does the process know what to do?
SGAYET wrote: It is running on 2 computers for load balancing
What is doing the balancing?
|
|
|
|
|
Not sure how to word the subject.
Perhaps this will be clear.
Formname.setObject("Object_name").Value = "True"
Any thoughts?
|
|
|
|
|
Define your own public properties for the Form if you want to access data you are storing within an instance of the Form from another class.
Paul Marfleet
|
|
|
|
|
I can do that.. But assuming I got into the Forms init method and I defined a function that accesses the objects' by name, I still don't know how to do that.
Any advice would be much appreciated.
Thanks.
|
|
|
|
|
I don't understand what you mean by 'objects'. Are you referring to controls hosted by the form? Or are you talking more generally about accessing the values of class-level object variables based on the name of the variable? If it is the latter, there is no built-in way of doing this. You could easily achieve this behaviour however by storing the objects within a Hashtable .
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
hi guys, im trying to bind data into a texbox1 and textbox2.
thats when i enter an item code number and quantity into textbox1 and press enter key, following codes details will appear on to textbox2.
here the sample seen in text box2
======================
|code no : 6089 |
|name : DVD CD |
|quantity: 2 |
|price : $12.50 |
=======================
i have created database in SQL
Can anyone help me to go through this binding data into textbox1 and textbox2?
thanks in great!!
so much of happy ending...
|
|
|
|
|
Does this data need to be editable, or is it just displaying information based on the (i'm assuming unique) code?
|
|
|
|
|
its just displaying information on testbox2 when a code number on textbox1 has entered.
testbox1
_____
|6077|
|____|
textbox2
________
|CLOTHES|
|_______|
so much of happy ending...
|
|
|
|
|
2 ways to do it. You can either pull the entire datatable worth of information and databind the table using a bindingsource(look up the bindingsource control), or you could make a call to the db every time you enter something and get that information.
Conceptually its pretty easy, you have a db full of information, and something you're using as the key to look stuff up. Hopefully you'll be able to figure out how to apply the SQL queries/form interaction.
|
|
|
|
|
Hi,
How would I go about finding a devices IP address given its hardware address?
I have a group of thin clients and they are given IP addresses by DHCP, I'm writing a little program to start a secure shell and that needs the clients IP address and all I have is the MAC.
Hope someone can help
Stephen
|
|
|
|
|
Your program runs on the client or the server?
What does "start a shell" mean?
|
|
|
|
|
The program will be run on a windows 2003 terminal server and will be used to issue commands to the thin clients that connect to the server. The server has a config file thinstation.hosts that contains the MAC address and name of each of the clients and I want to find the IP address of each of these clients which is assigned by dhcp. I'd like to do this without resorting to giving them all dhcp reservations and creating a new config file mapping these, which is quite possible but messy.
The dhcp server is a separate Windows 2003 server, I was thinking I may be able to lookup an IP address with a query this dhcp server (using WMI?). Or maybe as I know the name of the clients a query to DNS. Now before someone says just connect using the name, for some reason I can't. I think because the clients live in the .local domain and the server lives in the active directory domain.
A Secure Shell or SSH is a network protocol that allows data to be exchanged over a secure channel between two computers. I'm using Tamir.SharpSSH http://www.codeproject.com/cs/internet/sharpssh.asp and this works great when connect manually.
Hope this gives a little more info about what I'm looking for
Cheers, Stephen
|
|
|
|
|
r-mo wrote: Hope this gives a little more info about what I'm looking for
Well it's a start. I can't fathom why you wouldn't provide that information in your original post but whatever.
r-mo wrote: used to issue commands to the thin clients
"commands" is completely ambiguous so I still have no idea what your needs are. But since you do or might, I assume you have already eliminated using the Terminal Services API for your solution? Perhaps you could explain why the API does not provide a solution for you?
|
|
|
|
|
I think the WTSQuerySessionInformation function will do just what I need as it can retrieve the clients IP as well as a lot of other useful info I just need to figure out how to use it with C#.
Sorry for not including that info in my first post, I was thinking along the lines of querying dhcp for the ip rather than terminal services.
And the commands I'm issuing to the clients can't be done using the API afaik. They are running thinstation linux (http://thinstation.sourceforge.net) connecting with rdesktop. Commands issued will be things like shutting down the clients at the end of the day. Updating the thinstation image on the clients hard drive/flash memory etc...
Thanks for all your help
Stephen
|
|
|
|
|
r-mo wrote: I just need to figure out how to use it with C#.
You know about PInvoke yes? Also C++/CLI is a superior solution for managed development and greatly simplifies integration of native libraries.
r-mo wrote: Thanks for all your help
your welcome and good luck with your project.
|
|
|
|
|
I believe you can get the MAC/IP address table fromy our switch/router by using SNMP. I haven't actually done it, but I'm sure an existing SNMP library for C# is out there. Hope that helps get you in the right direction.
|
|
|
|
|
Good idea, I'll look into that, not really played with SNMP before. There's RARP too, that might work as well? all cisco switches if that makes a difference?
I would prefer to keep the app as non network specific as possible though that way other people who use thinstation may benefit from it
|
|
|
|
|
I'm a C++ programmer about 2 years. My question is not about to solve a specific trouble. I'm being scared with the crescent growing of languages like C# and Java. What I would like to know of anyone is the following: These languages will definitely substitute C++? In any kind of market. I've readed some news that game industry are thiking to adopt a unique hardware(something like a setupbox) and develop games to it. The programming language I think, will occur the same. If this hardware have an virtual machine inside it, java and C# are natural choices to develop games.
so, what do you think about that?
|
|
|
|
|
Alex Cutovoi wrote: I'm being scared
Of what?
Alex Cutovoi wrote: what do you think about that?
I don't know what to think, you didn't provide a link to this "news".
|
|
|
|
|
Alex Cutovoi wrote: My question is not about to solve a specific trouble.
Then you're posting in the wrong forum. This forum is for specific coding questions about C#
|
|
|
|
|
Alex Cutovoi wrote: These languages will definitely substitute C++?
In certain areas. For Line of business applications Java and C# have practically shut out C++ already.
In games there is now the XNA framework for C#. That is just for hobbiests, but I'm sure that commercial frameworks will be (or maybe already are) available.
|
|
|
|