What's goings-on calling WZCEnumInterfaces return error 1008 under WinXP
- From: sole.huang@xxxxxxxxx
- Date: 8 Aug 2006 01:07:30 -0700
Hi There,
I'm trying to get Wireless NICs for Enable/Disable WZC by calling
WZCEnumInterfaces in my app. program but failed. It returns error code
1008 (0xc0000005) ERROR_NO_TOKEN. I am very grateful who has any ideal
to help me.
////// Type Definition /////////////////////////////////////////////
typedef struct
{
#if defined(MIDL_PASS)
[unique, string] LPWSTR wszGuid;
#else
LPWSTR wszGuid;
#endif
} INTF_KEY_ENTRY, *PINTF_KEY_ENTRY;
typedef struct
{
DWORD dwNumIntfs;
#if defined(MIDL_PASS)
[size_is(dwNumIntfs)] PINTF_KEY_ENTRY pIntfs;
#else
PINTF_KEY_ENTRY pIntfs;
#endif
} INTFS_KEY_TABLE, *PINTFS_KEY_TABLE;
//////// Implementation
//////////////////////////////////////////////////////////
DWORD LoadWZCLibrary()
{
m_hWZCLib = LoadLibrary ("wzcsapi.dll");
if (!m_hWZCLib)
{
return GetLastError();
}
pfnWZCEnum=(pfnWZC_EnumInterfaces)GetProcAddress
(m_hWZCLib, "WZCEnumInterfaces");
...........................
}
DWORD WZCStatus(LPWSTR pcDevName, BOOL& bEnable)
{
INTFS_KEY_TABLE ikt;
PINTF_KEY_ENTRY pke;
INTF_ENTRY ie;
DWORD dwStatus;
DWORD dwOutFlags= 0;
dwStatus= pfnWZCEnum(NULL, &ikt);
if (dwStatus != ERROR_SUCCESS)
{
TRACE("WZCEnumeration Error 0x%X", dwStatus);
return GetLastError();
}
....................................
}
dwStatus return 0xc0000005
GetLastError return 1008 (ERROR_NO_TOKEN)
.
- Follow-Ups:
- Prev by Date: Re: Creating a "Fake" Network share.
- Next by Date: Re: Guru help needed: How to do sockets in DOS
- Previous by thread: WNetAddConnection2 Timeout
- Next by thread: RE: What's goings-on calling WZCEnumInterfaces return error 1008 under
- Index(es):
Relevant Pages
|