|
OK. The range you're talking about is technically 0 to Int32.Max. Though, system resources limits that to probably a few thousand adapters.
|
|
|
|
|
I didn't get your answer.see i have to develope an application in which i have to distinguish out of the network adapter cards available in the system,which one is ethernet and which one is wireless.Its easy to know which one is ethernet but for wireless i am not getting anything.But one think that I have noticed is index number for ethernet is genearlly 2,3etc and for wireless its 65530 etc.I was thinking to distinguish both referring to the index number.I hope u now understand what my problem is.Pls help if u have any answer to it.Thanks...
|
|
|
|
|
an89 wrote: number for ethernet is genearlly 2,3etc and for wireless its 65530
That's the wrong way to go about it. You have to query each adapter to get it's type.
You don't say what you're using to get the adapters list. I'll suggest using WMI to make it real easy to tell the difference. Check out the Win32_NetworkAdapter[^] class.
|
|
|
|
|
I have used GetAdapterAddress and GetAdapterInfo which are part of win32 API to get list of interfaces.But the problem is that for ethernet everything is showing fine.But for wireless adapter the type it is returning is "ethernet".But it is returning all other information correctly about the wireless adapter such as ipaddress,index and name.I don't know why its happening.and I can't use WMI.
|
|
|
|
|
OK. Look at Interfaces, not Adapters. You can get the media type (IEEE802.11 - Radio Spread Spectrum) from the Interfaces table. Check into the GetIf* functions instead.
|
|
|
|
|
I didn't get you.Could you please give me some links or some source code so as to understand what you have specified.Thanks....
|
|
|
|
|
GetIfTable[^]
If you look at the left side, you'll see all the GetIf* functions.
|
|
|
|
|
Thanks for your help but It didn't help either.The function displays type of wireless as ethernet.If you know any other method pls do reply.
|
|
|
|
|
Yes, it does tell you. That's the only method besides WMI to get what you want. The Type should have come back as IEEE802.11. If it didn't, then it's the fault of the driver for your adapter. dwType can currently come back with 144 different interface types.
|
|
|
|
|
no the type came as "ethernet".In Linux also the type for wireless adapter comes as "ethernet" when you give ifconfig.U can try it also.
|
|
|
|
|
I don't care, because I use WMI to do this stuff and it's not lying to me.
I already told you that this is the ONLY way to get the data you want, save for using WMI, which you "can't use". There is no other option. If it lies to you, there's nothing you can do about it. Well, other than see if the manufacturer of your wireless adapter has updated drivers, because that's where this data is coming from.
|
|
|
|
|
mine is not a built-in adapter.its a USB adapter.Can that be a reason for it?
|
|
|
|
|
I have no idea. I'm not going to repeat the bottom line for a third time.
|
|
|
|
|
I have swapped out a dvd drive on an old pc, and the message is coming up that that the system has loaded the drivers but is unable to locate the drive.
Any suggestions?
(Other than screaming and beating the damn thing)
------------------------------------
Credit is a system whereby a person who can not pay gets another person who can not pay to guarantee that he can pay. - Charles Dickens
|
|
|
|
|
Assuming the DVDROM worked in old pc, and did not have its own "special" drivers,
Try ...
Uninstall DVDROM from Device Manager, reboot and let windows find it again.
Motherboard BIOS set OK ?
DVDROM Jumpers set properly ?
IDE Cable round right way and NOT damaged ?
Power Supply cable - pins in plug not bent or poorly fitting ?
Can you try another DVDROM/CDROM and get same results ?
modified 1-Aug-19 21:02pm.
|
|
|
|
|
Got it working now!
Did the uninstall/reboot, no joy.
Didn't touch the BIOS, as settings looked ok.
Jumper was set right.
Tried reversing the cable, no joy.
Power ok.
Couldn't try the other DVD drive as that was the broken ome I was replacing!
Then, enlightenment!
Off to the registry... delete the thresholds!
reboot and voila!
------------------------------------
Credit is a system whereby a person who can not pay gets another person who can not pay to guarantee that he can pay. - Charles Dickens
|
|
|
|
|
I want to write such a driver for my cdrom:
1) When a specified disc(a encryped disc with some special information which can indicate that disc) injected in it and the user application want to read the disc, my driver will decrypt the content of the disc and return the decrypted content to the user application. Otherwise, my driver will transmit the io request to the default driver in the system.
How to implement such a driver?
2)Further more, if i want the user keep my specified application running to use the driver, in another word, only keep my appliction running can make the driver decrypted my disc or the io request would transmit to the default driver, should i have to create a exclusive mutex object in my user mode application so that my driver can chose the right action?
****edited******
I know, i should add this driver to the default driver which is present by the os. I found a driver implemented this. But it was surprising that, the driver simply called the IofCallDriver to deal most of the io request, only implemented IRP_MJ_POWER,IRP_MJ_DEVICE_CONTROL,IRP_MJ_INTERNAL_DEVICE_CONTROL, and IRP_MJ_PNP. But how it deal with what i want? Since it didn't do some its own task in IRP_MJ_READ, how did it hold the data readed from the disc?
Regards
|
|
|
|
|
Hi Dears
I want a code to find and get HDD Serial Number without WMI in Windows XP with Framework 2 _ VS2005
Can anyone help me?
|
|
|
|
|
Cute. You posted the exact same question in an article that shows you how to do it. Read the article and loko at the code same provided at the top and you'll have your answer.
BTW - spamming the entire site with the same question numerous times is considered very rude.
|
|
|
|
|
Hi All,
Iam faced with this problem.
1. I have an application that should be capable of handling two usb mice. Let me elaborate.Two usb mice (or mice
like devices) will be connected to my system (windows xp) obviously through USB ports. I should be able to assign
or say that the mouse connected to this (one fixed) physical USB port is my left mouse and the mouse connected to
another (fixed one) USB port is my right mouse. Next, I should be able to distinguish between the events generated
by both the mice.
2. I have tried Raw Input Api whereby Iam able to distinguish between mice inputs. But Iam not able to fix my mice as
left and right. I tried to distinguish the mice using usb port ids. But whenever I plug out and reinsert my mouse,
the port id keeps changing (is this observation correct?). Also, for this requirement, I should be able to say
before hand what is the port number of my left mouse and my right mouse.
Any help on this would be highly appreciated.
Kamalesh Narayan Nair
|
|
|
|
|
You're going to have to write your own driver.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
You posted this same question in visual c++/mfc. Where else have you been posting this same question, unaltered? >_>
|
|
|
|
|
I am having a problem with mapping the USB Port of a USB Device to it's coresponding DirectSound Device. I am doing this in order to associate a specific USB Port with a specific DirectSound Device in order to get the FriendlyName for the DirectSound Device to associate with an audio control. I need to have specific knowledge of the USB Port in order to make sure the endpoint audio device is going to the correct user. I'm working in VS 2005.NET C# and hope this is possible. I've taken a look at the C# version of USBView, which gets you down to the USB Device, and I have also looked at DirectSoundEnumerator, which I can use to search the Interface string for the "USB" substring in order to select the DirectSound USB Audio Devices. From what I can see so far, there is no matching information coming from either side in order to map these two together. Does anyone have any way of doing this? Thanks in advance for any help, which is greatly appreciated.
GrizMan
|
|
|
|
|
Here is a further update on what I have done:
I have a question about ParentIdPrefix. I am down at the device level for USB devices and I found the DriverKeyName by first setting up a SP_DEVINFO_DATA da = new SP_DEVINFO_DATA() structure and then calling SetupDiEnumDeviceInfo(h,i,ref da) and then using SetupDiGetDeviceRegistryProperty with SPDRP_DRIVER. Now I want to access the ParentIdPrefix at that level and compare it to the ParentIdPrefix I extract from the Interfaces ID string provided by DirectSound. In my code in which I have used the example from USBView to get to the USB Device level. I tried to get the ParentIdPrefix by using CM_Get_Parent with the da.DevInst value I have. The value I received (3042) does not represent the ParentIdPrefix value (string) (7&f4e88d5&0) I can see in the registry. I would like to get the value I see in the registry. Do you know how I would go about this?
Thanks in advance for your help.
GrizMan
|
|
|
|
|
m using a bridge for encrypting my ethernet link. now i want to send traffic from one system to the other with 2 bridges between them one for encrypting, other for decrypting and want to check how much over head they are creating as in decrease in transfer speed (if any). how can i check that?
please refer to any 'free' software.
also
my LAN cards are 1Gbs in both PC's and both Bridges, would that be ok or should i use a better card in my PC's. and any other thing (e.g. LAN cable) that can create a bottle neck in my case that i need to know?
i appreciate ur help
|
|
|
|