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.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: 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
)

Parameters

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.

Return Value

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.

Remarks

See Also