Ensure you declare A as string. I have seen faults with the winsock caused by it not being declared as string