473,221 Members | 2,232 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,221 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 10364
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...
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...

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.