在 Windows 平台通过 GeoID 检测用户所处国家/区域 (#3891)
This commit is contained in:
@@ -44,4 +44,8 @@ public interface Kernel32 extends StdCallLibrary {
|
||||
*/
|
||||
int GetACP();
|
||||
|
||||
/**
|
||||
* @see <a href="https://learn.microsoft.com/windows/win32/api/winnls/nf-winnls-getusergeoid">GetUserGeoID function</a>
|
||||
*/
|
||||
int GetUserGeoID(int geoClass);
|
||||
}
|
||||
|
||||
@@ -36,4 +36,8 @@ public interface WinConstants {
|
||||
long HKEY_CURRENT_CONFIG = 0x80000005L;
|
||||
long HKEY_DYN_DATA = 0x80000006L;
|
||||
long HKEY_CURRENT_USER_LOCAL_SETTINGS = 0x80000007L;
|
||||
|
||||
int GEOCLASS_NATION = 16;
|
||||
int GEOCLASS_REGION = 14;
|
||||
int GEOCLASS_ALL = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user