Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8209969
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T09:55:00+00:00 2026-06-07T09:55:00+00:00

I need to get the MAC address of a Windows Mobile device. Is it

  • 0

I need to get the MAC address of a Windows Mobile device. Is it possible to do this without using, say, OpenNetCF, only by .NET Compact Framework? The solution is in C# (Visual Studio 2008, a smart device project).

Having read Read MAC Address from network adapter in .NET, I wanted to use the example by plinth, but there was no kernel32.dll on the device.

Is there aother way to get the MAC address in .NET Compact Framework, or how could I replace the following methods:

     [DllImport("Kernel32.dll", EntryPoint = "CopyMemory")]
     private static extern void ByteArray_To_IPAdapterInfo(ref AdapterInfo dst, Byte[] src, int size);
     [DllImport("Kernel32.dll", EntryPoint = "CopyMemory")]
     private static extern void IntPtr_To_IPAdapterInfo(ref AdapterInfo dst, IntPtr src, int size);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T09:55:02+00:00Added an answer on June 7, 2026 at 9:55 am

    If you want to get the MAC address, but without using a library like OpenNETCF’s SDF then you simply have to do the same thing it does in your own code. You need to P/Invoke GetAdaptersInfo, something like this:

    [DllImport("iphlpapi.dll", SetLastError = true)]
    public static extern int GetAdaptersInfo(byte[] pAdapterInfo, ref uint pOutBufLen);
    

    You’ll want to call it once with a null first parameter to get the size, then allocate a byte array of the proper size and recall it. It will fill it with an array of IP_ADAPTER_INFO structs that you then parse for each adapter in the system. The Address member is what you’re after for the MAC address.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to many MAC address for one Device in Android. is it possible
I need to look up MAC address in the local network and I'm using
I need to get the MAC address from a PC. The code I've written
I need to get the mouse position on the screen on a Mac using
Possible Duplicate: Get the MAC of ASP.NET website user i am developing a local
Using one of my WinForms applications, I need to display the MAC address of
This question is exactly like this question: How to get MAC address of your
I need to get this file ftp://1034733:ze3Kt699vy14@idx.living.net/idx_fl_ftp_down/idx_ftmyersbeach_dn/ftmyersbeach_data.zip to my site's server. THis seems like
I have linq request. I need get item.Title in select. how do this? var
I need to get the contents from this URL http://google.fr/ok in a NSString can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.