Kernel32GetUserDefaultGeoName Method
Retrieves the two-letter International Organization for Standardization (ISO) 3166-1 code
or numeric United Nations (UN) Series M, Number 49 (M.49) code for the default geographical location of the user.
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("Kernel32.dll", CharSet = CharSet.Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)]
public static int GetUserDefaultGeoName(
StringBuilder geoName,
int geoNameCount
)
<DllImportAttribute("Kernel32.dll", CharSet := CharSet.Auto, BestFitMapping := false,
ThrowOnUnmappableChar := true, SetLastError := true>]
Public Shared Function GetUserDefaultGeoName (
geoName As StringBuilder,
geoNameCount As Integer
) As Integer
Dim geoName As StringBuilder
Dim geoNameCount As Integer
Dim returnValue As Integer
returnValue = Kernel32.GetUserDefaultGeoName(geoName,
geoNameCount)
public:
[DllImportAttribute(L"Kernel32.dll", CharSet = CharSet::Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)]
static int GetUserDefaultGeoName(
StringBuilder^ geoName,
int geoNameCount
)
[<DllImportAttribute("Kernel32.dll", CharSet = CharSet.Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)>]
static member GetUserDefaultGeoName :
geoName : StringBuilder *
geoNameCount : int -> int
No code example is currently available or this language may not be supported.
- geoName StringBuilder
-
Pointer to a buffer in which this function should write the null-terminated two-letter ISO 3166-1
or numeric UN M.49 code for the default geographic location of the user.
- geoNameCount Int32
-
The size of the buffer that the geoName parameter specifies.
If this value is zero, the function only returns the number of characters that function would copy to the output buffer,
but does not write the name of the default geographic location of the user to the buffer.
Int32
The number of characters the function would copy to the output buffer, if the value of the
geoNameCount parameter is zero.
Otherwise, the number of characters that the function copied to the buffer that the
geoName parameter specifies.
A return value of zero indicates that the function failed.