|
That's something at least. But I want receive the list of all com ports from my program. To use only WinApi.
|
|
|
|
|
Enumerate the HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM registry key.
|
|
|
|
|
Hi,
it is rather simple to try a series of port names, as in the following code:
public static object[] GetSerialPorts() {
ArrayList ports=new ArrayList();
byte[] bytes=new byte[1024];
for (int port=1; port<30; port++) {
string portName="COM"+port;
int size=1024;
bool exists=GetDefaultCommConfig(portName, bytes, ref size);
if (exists) ports.Add(portName);
}
return ports.ToArray();
}
[DllImport("kernel32.dll", CharSet=CharSet.Ansi,
CallingConvention=CallingConvention.Cdecl)]
public static extern bool GetDefaultCommConfig(string portName, byte[] buf,ref int bufSize);
The above works on all .NET versions.
Starting with .NET 2.0 you can use SerialPort.GetPortNames() to get all serial port
names (also those that are not COM#).
|
|
|
|
|
System Configuration:
ASUS Motherboard-VN Series
512 MB DDR RAM
Athlon 1.8 GHZ processor
When I switch on the system(CPU), I hear a booting sound, and after sometimes of working or after showing the POST screen, the monitor turns red(Means it loses its connection to CPU). After that even if I switch on, only Mouse(Optical) light is seen. Mother board light is on at that time and also both the fans(Processor & CPU) are running in the MotherBoard. It happened 15 days before and I just cleaned up the motherboard and it has been working for the past 15 days(could be incidental). I just cleaned up the motherboard and that went in vain. I request someone to help me in this scenario.
|
|
|
|
|
i have a problem of overheating in my pc.
After 5 min the pc will turn off.(for the first time)
can anybody help me?
etretyertyery
|
|
|
|
|
tantoun wrote: i have a problem of overheating in my pc.
Are your fans running or old?
tantoun wrote: After 5 min the pc will turn off.(for the first time)
That isn't necessarily an overheating problem, it could be a bad power supply or motherboard. Try checking your computer's temperature with SpeedFan and see if it is really overheating.
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
The easiest will be try to put some case fans from local hardware shop.
Also take a look at the CPU Fan that may be clogged use to dust.
Try cleaning the fans with Air dust cleaner of just vacuume cleaner with blowing nozzle.
Tapas Shome
System Software Engineer
Keen Computer Solutions
1408 Erin Street
Winnipeg, Manitoba
Canada R3E 2S8
www.keencomputer.com
|
|
|
|
|
Hi, Pls can someone help on how i can get my Serial Port ID?
thanks
bablo
bablo
|
|
|
|
|
ManagementObjectSearcher searcher = new ManagementObjectSearcher("Select * from WIN32_SerialPort");
foreach(ManagementObject Port in searcher.Get())
{
Console.Write(Port.GetPropertyValue("Name"));
}
you need a using and a reference to System.Management.
-- modified at 10:40 Wednesday 4th April, 2007
I'm sorry, this of course, is only C# code, if this isn't what you were looking for,.. well then specify :p
Visual Studio can't evaluate this, can you?
public object moo<br />
{<br />
__get { return moo; }<br />
__set { moo = value; }<br />
}
|
|
|
|
|
Hi all,
I have a problem with my RAM. I have a motherboard (ChainTech Zenith 250 K8) that has three RAM slots, so I put 512Mb in the first and last slot(third) and 1Gb in the second slot, but when I turn on my PC, it doesn't want ot start up??
Can anyone please help me ??
Many Thanx
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
My Blog: ^_^
|
|
|
|
|
i think there is no Problem with RAM
u have to check first that is motherboard capable for more than 1GB RAM
also plz tell that when u start PC does it give Beeeeeeeeeep (any sound) Continiously
SP
--
Bugs can neither be created nor be removed from software by a developer. They can only be converted from one form to another. The total number of bugs in the software always remain constant.
|
|
|
|
|
Hi,
I would not recommend the order (512+1024+512) of your memory DIMMs.
I think some boards dont support this.
Try 1024+512+512
If that does not work, test the DIMMs individually, then the slots individually.
|
|
|
|
|
Hey call your system administrator.....
Just kidding..
Just try ... and try and try ...... Some day glory will kiss your feet..
|
|
|
|
|
Hi all,
I need some suggestions & ideas for PC Interfacing projects such as controlling something via PC & using sensors or heating something via USB, ... etc.
So any creative ideas?!!
Waiting for your replies.
Regards,
|
|
|
|
|
Hmmm
this is actually a really fun idea.
You could make a bazillion different games, and I can give you some game ideas cause I have plenty of those (not saying they're any good).
Some things that spring to my mind
- count people/cars passing by in a street with a camera
- create an alarm/logger that works on sound recording (or pressure measurements)
- put a bunch of heat sensors in a room and calculate a person/objects movement by these measurements
- create an application that moves your mouse button as you move your finger in front of the camera, and clicks when you yell "CLICK"
hey this is fun. Does your company ask you to do this, and if they do, can I work there too? :p
If you want, I could come up with a thousand more, but then you'll have to specify what you're capabilities are (webcam, microphone, fingerprint reader, retinal scan, heat sensor, pressure sensor,...) and if it should be practical or fun
Visual Studio can't evaluate this, can you?
public object moo<br />
{<br />
__get { return moo; }<br />
__set { moo = value; }<br />
}
|
|
|
|
|
WOOOOOOOOOW..
Really nice & creative ideas but I'm not sure that I can do this..
I'm doing this as a project for one of the courses that I'm taking (i.e. I am a student).
My capabilities are (webcam, microphone, or I can buy anything needed for that) and it should be practical && fun
Waiting to hear from you
Regards,
|
|
|
|
|
I think starting off with a sound recorder or something would be the easiest way. I'm not sure how to do this myself, but I can't think it to be very hard to process sound and f.e. check if it's over a certain volume, and then you can f.e. create an alarm on your laptop
I write code in C# and I (and everybody else in the C# section) can help you with that portion. If I find the time, I'll check it out.
Visual Studio can't evaluate this, can you?
public object moo<br />
{<br />
__get { return moo; }<br />
__set { moo = value; }<br />
}
|
|
|
|
|
Dear Noora,
I would suggest interfacing to the graphic LCD:
something like... http://www.crystalfontz.com/products/index-grph.html
Maybe making a small game like PONG using the mouse
|
|
|
|
|
one of my cust is using IBM globle intranet , prerequsit is that he should be conneted with internet to use this intranet , cust is able to use intranet sites but not able to connect with yahoo or google ???
he is getting valid ip add provided by IBM server , subnet mask is 255.255.0.0
wats went wronge , can it be an issue with ISP ??
or is there any network computer settings which i m missing ??
rituparn
RST
|
|
|
|
|
Hello everyone, can you please tell me why my laptop (IBM T41) gets stuck when I installed 1GB DD-RAM PC-2700.. when the current built-in RAM is 512??
Thanks a lot guys
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
Well you better check whether your system supports DDR or not and second make a hardware check each time you boot it by disabling Rapid BIOS or somewhat like that.
hope it helps.
Spread wat u Know!
|
|
|
|
|
Thank you, I'll see what I can do, thank you Cmania
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
Hi,
Well RAM is sometimes a problem. U need to check first whether the RAM is the older SD one or the DDR which are now common in the market.
Assuming that it is DDR, it should be checked whether it is DDR1 or DDR2. DDR2 wont work if your original RAM (512) was of the first version.
Moreover, some RAMs dont work if the difference in the frequencies at which they work is different.
So check for the frequencies as well.
Enjoy
Keshav Kamat
India
|
|
|
|
|
Hello , i want to connect my network (lan), office network, 25 pc, through a switch, i want to connect to the internet, do i need a Router?
please emphasise.
thanks in advance.
scorpion.
|
|
|
|
|
Yes, you need a router.
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|