Before lunch today, I saw a bug recorded in April, when the computer used wireless Internet access, the software could not be turned on, and it was not solved at that time (the customer said it would be better to change to wired). I thought about it at lunch and felt that there was an error in obtaining the MAC address when verifying the authorization, and when I came back after eating, I looked at the code, and there was indeed a problem. When authorizing, it is authorized according to the MAC address of the local network card, and the MAC address of the wireless network card used for authorization is verified when logging in, so the software cannot be opened. I searched briefly, referred to this article, combined with the description on msdn and the local test, changed the function to obtain the MAC address of the local physical network card, and passed the test (test environment Win7 Enterprise Edition 64-bit notebook). The function code is as follows:
|