473,387 Members | 1,440 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

C# newbie on Wifi Programming

Hi,

I do have some experience in programming in C# but mainly with database.
Now I am trying to learn some systems programming. I am trying to do some
project on WiFi radar to begin with.

I found the APIs at http://msdn2.microsoft.com/en-us/library/ms706783.aspx
But I am not sure how to use them. Do I need to install additional header
files/ libraries/DLLs?

Basically, how do I get start using those APIs?

Any link or suggestion is highly appreciated.

thank you.

Jun 27 '08 #1
4 10391
Nighthawk wrote:
>
I found the APIs at http://msdn2.microsoft.com/en-us/library/ms706783.aspx
But I am not sure how to use them. Do I need to install additional
header files/ libraries/DLLs?

Basically, how do I get start using those APIs?
I don't have any code samples at hand. But the following may get you
started:

You will need to explore the [Unsafe] side of C#. This will give you
C-like pointers. See
http://msdn2.microsoft.com/en-us/lib...b8(VS.71).aspx

Also have a look at the [StructLayout] attribute. You will need to
convert the C[++] structs to C#.
-HH-

Jun 27 '08 #2

"henk holterman" <re*********@xs4all.nlwrote in message
news:48***********************@news.xs4all.nl...
Nighthawk wrote:
>>
I found the APIs at
http://msdn2.microsoft.com/en-us/library/ms706783.aspx
But I am not sure how to use them. Do I need to install additional header
files/ libraries/DLLs?

Basically, how do I get start using those APIs?

I don't have any code samples at hand. But the following may get you
started:

You will need to explore the [Unsafe] side of C#. This will give you
C-like pointers. See
http://msdn2.microsoft.com/en-us/lib...b8(VS.71).aspx

Also have a look at the [StructLayout] attribute. You will need to convert
the C[++] structs to C#.
-HH-

Thanks HH

That was very informative. I didn't know we can use pointers as in C! in C#.

But first I am not able to use NativeWifi. I tried putting "Using
NativeWifi" in my C# code but it throws error right there.

I think I will need to add reference to my application. I don't know which
dll i need to import.

I have installed Windows SDK. Tried searching for Nativewifi.dll but could
not find it. There is a file Nativewifi.hxs but I don't know what that is or
how to use it.

Please help me get started.

thanks
Jun 27 '08 #3
Nighthawk wrote:
>
But first I am not able to use NativeWifi. I tried putting "Using
NativeWifi" in my C# code but it throws error right there.

I think I will need to add reference to my application. I don't know
which dll i need to import.

I have installed Windows SDK. Tried searching for Nativewifi.dll but
could not find it. There is a file Nativewifi.hxs but I don't know what
that is or how to use it.

Please help me get started.

Nighthawk,

Nativewifi.hxs is some sort of compiled helpfile (part of MSDN)

You'll need to look for ndisXXX.h files, they are installed as part of
the Mobile SDK. (Probably somewhere under Program Files). But maybe only
if you opted to include C++ development.

When you've found the headers you will have to import the functions (see
the ImportDll attribute) and translate the struct definitons into
equivalent C# code. There may exist tools for that, but if you need only
a few you might try it by hand. It will take some learning.

Personally I am impressed with the tools C# offers (like
[FieldOffset()]) but it will be of little help until you understand C
structs and the typical WinAPI types. Note that C or C++ hardly matters
here.


-HH-
Jun 27 '08 #4

"henk holterman" <re*********@xs4all.nlwrote in message
news:48***********************@news.xs4all.nl...
Nighthawk wrote:
>>
But first I am not able to use NativeWifi. I tried putting "Using
NativeWifi" in my C# code but it throws error right there.

I think I will need to add reference to my application. I don't know
which dll i need to import.

I have installed Windows SDK. Tried searching for Nativewifi.dll but
could not find it. There is a file Nativewifi.hxs but I don't know what
that is or how to use it.

Please help me get started.


Nighthawk,

Nativewifi.hxs is some sort of compiled helpfile (part of MSDN)

You'll need to look for ndisXXX.h files, they are installed as part of the
Mobile SDK. (Probably somewhere under Program Files). But maybe only if
you opted to include C++ development.

When you've found the headers you will have to import the functions (see
the ImportDll attribute) and translate the struct definitons into
equivalent C# code. There may exist tools for that, but if you need only a
few you might try it by hand. It will take some learning.

Personally I am impressed with the tools C# offers (like [FieldOffset()])
but it will be of little help until you understand C structs and the
typical WinAPI types. Note that C or C++ hardly matters here.


-HH-
Thanks a lot. Now I am getting what you have been trying to tell me :)

And I found this site http://www.codeplex.com/managedwifi I guess he has
done all what you were trying to tell me, if I am correct.

With that code I have taken a step further in my project and now I can scan
and see the list of APs and then continue further.
It has been good learning experience !

Can you please suggest me a book that covers these advance topics and not
database or web apps :)

Jun 27 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jon Vaughan | last post by:
Hello all, I have written a program that is a client / server program running over a wifi network. When the computer boots windows connects to the network 99% of the time , but now and again it...
3
by: catzid | last post by:
Hi all, I am a total newbie to programming and this is my first posting on a forum, so forgive me if I break any unwritten etiquette about posting. To get to the point I've been using VBA for...
4
by: marmar12 | last post by:
I'm a newbie to programming and am doing this project using linux and an error message keeps popping up and i've tried everything but cannot get it fixed and compiled. Please help, its due today! ...
5
by: Banibrata Dutta | last post by:
Hi, I've gone through the list of "language differences" between 2.3 / 2.4 & 2.5 of CPython. I've spend around 2 weeks now, learning v2.5 of CPython, and I consider myself still very very...
16
by: Raxit | last post by:
Hi, i was reading/learning some hello world program in python. I think its very simillar to Java/C++/C#. What's different (except syntax) ? what can i do easily with python which is not easy...
3
by: Sinnergy | last post by:
Hello, let me introduce myself for this is my first post, I am a 3rd year Computer Science student this coming June 7, 2010 (South East Asia, Philippines). My goal is to be a Software Engineer. I'm...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.