Salut les gens, tout d'abord merci, ensuite encore besoin d'aide
voici la fameuse fonction à utiliser pour choper le handle :
DWORD WINAPI WlanOpenHandle(
__in DWORD dwClientVersion,
__reserved PVOID pReserved,
__out PDWORD pdwNegotiatedVersion,
__out PHANDLE phClientHandle
);
ma 1ère question (certainement bête) : PHANDLE est un pointer sur un HANDLE ?
2nde question : voici le code tel que je l'utilise:
PDWORD out1=NULL;
PHANDLE out2=NULL;
if (WlanOpenHandle(1,NULL,out1,out2) != ERROR_SUCCESS ) cout << "error openHandle" << endl;
PWLAN_AVAILABLE_NETWORK_LIST p;
char c1;
GUID g;
HRESULT res = CoCreateGuid(&g);
if (res != S_OK) cout << "erreur CoCreateGuid" << endl;
DWORD d = WlanGetAvailableNetworkList(*out2,(const GUID *)&g ,0x00000001,NULL,&p);
//la j'ai un switch sur le resultat d pour savoir si j'ai une erreur
lorsque je compile j'ai une erreur :
Unhandled exception at 0x00412128 in Scan.exe: 0xC0000005: Access violation reading location 0x00000000.
Scan étant le nom du projet
bon est-ce que cela viendrait du troisieme parametre de lWlanGetAvailableNetworkList ?
merci encore