isState Returns Large Value

Naserati 1 Reputation point

I'm currently calling the WlanEnumInterfaces function in the Wlan API. The WlanEnumInterfaces function returns a WLAN_INTERFACE_INFO_LIST struct and within one of the fields it stores an array of WLAN_INTERFACE_INFO structs.

The question I have is within WLAN_INTERFACE_INFO struct there is a field called isState which is supposed to be a WLAN_INTERACE_STATE, however, I'm getting 1296387404. Is there any decoding I'm supposed to do to get the Interface State value?

Here are my structs in Golang:

type WLAN_INTERFACE_INFO struct {  
    InterfaceGuid        GUID  
    InterfaceDescription [256]uint16  
    State               uint32  

    NumberOfItems uint32  
    Index         uint32  
    InterfaceInfo [MAX_INDEX + 1]WLAN_INTERFACE_INFO  

Here's my Golang function incase:

func WlanEnumInterfaces(hClient, reserved uintptr,  
 ppInterfaceList **models.WLAN_INTERFACE_INFO_LIST,  
) syscall.Errno {  
 ret, _, errno := hWlanEnumInterfaces.Call(hClient, reserved, uintptr(unsafe.Pointer(ppInterfaceList)))  
 if ret != 0 {  
 return syscall.Errno(ret)  

Here are links to the C++ wlan functions, structs, and enumerations.
WLAN_INTERFACE_INFO_LIST: ns-wlanapi-wlan_interface_info_list
WLAN_INTERFACE_INFO: ns-wlanapi-wlan_interface_info
WLAN_INTERFACE_STATE: ne-wlanapi-wlan_interface_state-r1
WlanEnumInterfaces: nf-wlanapi-wlanenuminterfaces

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,508 questions
{count} votes