1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| LPWSTR nomDomaineOuGroupe=NULL;
NETSETUP_JOIN_STATUS status;
NET_API_STATUS retour;
if ( (retour=NetGetJoinInformation(NULL, &nomDomaineOuGroupe, &status)) != NERR_Success)
{
Erreur(retour, "NetGetJoinInformation", __FILE__, __LINE__);
}
if ( (retour=NetApiBufferFree(nomDomaineOuGroupe)) != NERR_Success)
{
Erreur(retour, "NetApiBufferFree", __FILE__, __LINE__);
}
char convertis[50]={0};
WideCharToMultiByte(CP_ACP, NULL, nomDomaineOuGroupe, -1, convertis, sizeof(convertis), NULL, NULL);
MessageBox(NULL, convertis, "test", MB_OK); |
Partager