Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GetLocaleInfo
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Miscellaneous
Thread ID:
00139420
Message ID:
00139817
Views:
15
>>Here is the code I am using:
>>
>>Public Const LOCALE_SDATE = &H1D
>>Public Declare Function GetLocaleInfo Lib "kernel32" Alias _
>>"GetLocaleInfoA" (ByVal Locale As Long, ByVal LCType As _
>>Long, lpLCData As String, ByVal cchData As Integer) As Integer
>>Public Declare Function GetSystemDefaultLCID Lib "kernel32" () As Long
>>
>>
>>Public Sub SetDate()
>> Dim dwLCID As Long
>> Dim leng As Integer
>> Dim buf As String
>> Dim Seperator As Integer
>>
>> buf = Space(255)
>> leng = Len(test)
>>
>> dwLCID = GetSystemDefaultLCID()
>> Seperator = GetLocaleInfo(dwLCID, LOCALE_SDATE, buf, leng)
>> MsgBox (buf)
>>
>>End Sub
>>
>>* Note that Seperator always returns 0 and buf returns nothing.
>
>Hi Michel,
>
>The only thing that I can see may be that the third parameter should be passed by reference. It's been awhile since I've played with VB (Version 3.0). If I recall correctly, the solution to your problem may be to simply add ByRef to the function declaration.
>
>hth,

Still nothing. Thanks for the help anyway George.
Analystik Team
1430 Belanger
Montreal (Quebec)
Canada
(514) 278-2727
analyste@analystik.ca
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform