Skip to content

Conversation

@eranl
Copy link
Contributor

@eranl eranl commented Oct 18, 2025

This is a partial mapping of WlanApi.h.

Copy link
Member

@matthiasblaesing matthiasblaesing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, I made a first pass. Please have a look at the inline comments.

Copy link
Member

@matthiasblaesing matthiasblaesing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update. I checked the type definitions against MSDN and the headers are a bit convoluted. I see:

  • Definitions from Wlantypes.h (or Windot11.h, see blow):

    • DOT11_SSID_MAX_LENGTH
    • DOT11_AUTH_ALGORITHM
    • DOT11_CIPHER_ALGORITHM
    • DOT11_BSS_TYPE (it is defined in Wlantypes.h, MSDN says you should include windot11.h ...)
    • DOT11_SSID (it is defined in Wlantypes.h, MSDN says you should include windot11.h ...)
  • Definitions from Windot11.h:

    • DOT11_MAC_ADDRESS
    • DOT11_PHY_TYPE

I think moving the referenced types to Windot11.java might be the cleanest solution.

For the type mapping of WLAN_SECURITY_ATTRIBUTES, please ensure, that a correct typemapper is active. boolean is not well defined. In Windows it is BOOL (32bit), but people would like to have boolean be a C bool, which is one byte (commonly). Use the com.sun.jna.win32.W32APITypeMapper.UNICODE mapper.

@eranl
Copy link
Contributor Author

eranl commented Nov 16, 2025

  • DOT11_SSID_MAX_LENGTH
  • DOT11_AUTH_ALGORITHM
  • DOT11_CIPHER_ALGORITHM
  • DOT11_BSS_TYPE (it is defined in Wlantypes.h, MSDN says you should include windot11.h ...)
  • DOT11_SSID (it is defined in Wlantypes.h, MSDN says you should include windot11.h ...)
  • DOT11_MAC_ADDRESS
  • DOT11_PHY_TYPE

I think moving the referenced types to Windot11.java might be the cleanest solution.

I moved all of these to Windot11.java. Is that what you meant?

For the type mapping of WLAN_SECURITY_ATTRIBUTES, please ensure, that a correct typemapper is active. boolean is not well defined. In Windows it is BOOL (32bit), but people would like to have boolean be a C bool, which is one byte (commonly). Use the com.sun.jna.win32.W32APITypeMapper.UNICODE mapper.

I used W32APITypeMapper.UNICODE. Anything else needed?

Copy link
Member

@matthiasblaesing matthiasblaesing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your patience. There are two inline changes required.

After that please squash all changes into a single commit and add an entry to CHANGES.md in the Features section. Have a look at the other entries for the format and template for the changes.

@@ -0,0 +1,109 @@
/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
/* Copyright (c) 2025 Eran Leshem, All Rights Reserved

@@ -0,0 +1,234 @@
/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
/* Copyright (c) 2025 Eran Leshem, All Rights Reserved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants