microsoft/Windows-classic-samples

Return of pointer to local variable

OwnageIsMagic opened this issue · 0 comments

LPSTR DetermineAdapter()
{
DWORD dwResult; // result of API calls
IP_INTERFACE_INFO * pInfo = NULL; // adapter information structure
DWORD dwSize = 0; // size of required buffer
CHAR szAdapter[MAX_ADAPTER_NAME] = {0}; // the adapter to use