How can my program detect whether it's running on a particular domain?

前端 未结 3 742
一整个雨季
一整个雨季 2021-01-05 22:21

I have the need to restrict specific functions of an application based on the location of the currently logged in user. As I have to implement this logic in Delphi, I\'d pre

3条回答
  •  星月不相逢
    2021-01-05 22:58

    If I correct understand your requirement the best API in your case is GetUserNameEx. You can choose the value of NameFormat parameter of the type EXTENDED_NAME_FORMAT which you can better verify. Another function GetComputerNameEx is helpful if you want additionally verify the information about the computer where the program is running.

提交回复
热议问题