B
Beholder
I'm trying to call the Windows API's function
GetLocaleInfo but the call fails. Using the GetLastError
function, I get error 126: The specified module could not
be found. Here's my code:
private const int LOCALE_SYSTEM_DEFAULT=0x400;
private const int LOCALE_SDECIMAL=0xE;
[DllImport("kernel32.dll",SetLastError=true)]
private static extern int GetLocaleInfoA(int Locale,int
LCType,string lpLCData,int cchData);
private const Int32 MAX_SYMBOL_LENGTH=4;
Int32 callResult;
String symbol;
symbol=new String(' ',MAX_SYMBOL_LENGTH+1);
callResult=GetLocaleInfoA
(LOCALE_SYSTEM_DEFAULT,LOCALE_SDECIMAL,symbol,symbol.Length
);
GetLocaleInfo but the call fails. Using the GetLastError
function, I get error 126: The specified module could not
be found. Here's my code:
private const int LOCALE_SYSTEM_DEFAULT=0x400;
private const int LOCALE_SDECIMAL=0xE;
[DllImport("kernel32.dll",SetLastError=true)]
private static extern int GetLocaleInfoA(int Locale,int
LCType,string lpLCData,int cchData);
private const Int32 MAX_SYMBOL_LENGTH=4;
Int32 callResult;
String symbol;
symbol=new String(' ',MAX_SYMBOL_LENGTH+1);
callResult=GetLocaleInfoA
(LOCALE_SYSTEM_DEFAULT,LOCALE_SDECIMAL,symbol,symbol.Length
);