Hi all,
I am trying to tap in to wzcsapi.dll in windows using c#. Im able to call the funtion WZCEnumInterfac es with no problem. The problem I have is when I call the function WZCQueryInterfa ce it gives me an error return code of 2 (File not found) I cant figure out whats going on here..what file is it looking for?
I am trying to tap in to wzcsapi.dll in windows using c#. Im able to call the funtion WZCEnumInterfac es with no problem. The problem I have is when I call the function WZCQueryInterfa ce it gives me an error return code of 2 (File not found) I cant figure out whats going on here..what file is it looking for?
Code:
public struct RAW_DATA
{
public uint dwDataLen;
public uint pData;
}
public struct INTF_ENTRY
{
public uint wszGuid;
public uint wszDescr;
public UInt32 ulMediaState;
public UInt32 ulMediaType;
public UInt32 ulPhysicalMediaType;
public int nInfraMode;
public int nAuthMode;
public int nWepStatus;
public uint dwCtlFlags;
public uint dwCapabilities;
public RAW_DATA rdSSID;
public RAW_DATA rdBSSID;
public RAW_DATA rdBSSIDList;
public RAW_DATA rdStSSIDList;
public bool bInitialized;
}
public struct INTF_KEY_ENTRY
{
public uint wszGuid;
}
public struct INTFS_KEY_TABLE
{
public uint dwNumIntfs;
public INTF_KEY_ENTRY pIntfs;
}
[DllImport("wzcsapi.dll")]
public static extern uint WZCEnumInterfaces(string pSrvAddr, ref INTFS_KEY_TABLE pIntfs);
[DllImport("wzcsapi.dll")]
public static extern uint WZCQueryInterface(string pSrvAddr, uint dwInFlags, ref INTF_ENTRY pIntf, ref uint pdwOutFlags);
static void Main(string[] args)
{
INTFS_KEY_TABLE pIntfs = new INTFS_KEY_TABLE();
INTF_ENTRY Intf = new INTF_ENTRY();
uint uiRet;
uint uiInFlags = 0xFFFFFFFF;
uint uiOutFlags = 0;
uiRet = WZCEnumInterfaces(null, ref pIntfs);
Intf.wszGuid = pIntfs.pIntfs.wszGuid;
uiRet = WZCQueryInterface(null, uiInFlags, ref Intf, ref uiOutFlags);
//uiRet = 2
}
Comment