src/Cedar/VLanWin32.c
// Get the instance ID of the virtual LAN card

Get the instance ID of the virtual LAN card
Get the instance ID of the virtual LAN card
UINT GetInstanceId(char *name)
{
	char tmp[MAX_SIZE];
	UINT id = 0;
	if (name == NULL)
	{
		return 0;
	}
	Format(tmp, sizeof(tmp), VLAN_ADAPTER_NAME_TAG, name);
	id = GetVLanInterfaceID(tmp);
	if (id != 0)
	{
		return id;
	}
	else
	{
		Format(tmp, sizeof(tmp), VLAN_ADAPTER_NAME_TAG_OLD, name);
		id = GetVLanInterfaceID(tmp);
		return id;
	}
}
UINT GetInstanceId ( char * name ) { char tmp [ MAX_SIZE ] ; UINT id = 0 ; if ( name == NULL ) { return 0 ; } Format ( tmp , sizeof ( tmp ) , VLAN_ADAPTER_NAME_TAG , name ) ; id = GetVLanInterfaceID ( tmp ) ; if ( id != 0 ) { return id ; } else { Format ( tmp , sizeof ( tmp ) , VLAN_ADAPTER_NAME_TAG_OLD , name ) ; id = GetVLanInterfaceID ( tmp ) ; return id ; } }
Get the instance ID of the virtual LAN card
Get the instance ID of the virtual LAN card
// Validate arguments
