Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
e2511e19
Commit
e2511e19
authored
May 29, 2005
by
Marcus Meissner
Committed by
Alexandre Julliard
May 29, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added VarMonthName() implementation.
parent
d1a55eb3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
1 deletion
+55
-1
oleaut32.spec
dlls/oleaut32/oleaut32.spec
+1
-1
varformat.c
dlls/oleaut32/varformat.c
+54
-0
No files found.
dlls/oleaut32/oleaut32.spec
View file @
e2511e19
...
...
@@ -126,7 +126,7 @@
126 stdcall VarBoolFromDisp(ptr long ptr)
127 stdcall VarFormatCurrency(ptr long long long long long ptr)
128 stub VarWeekdayName # stdcall (long long long long ptr)
129 st
ub VarMonthName # stdcall
(long long long ptr)
129 st
dcall VarMonthName
(long long long ptr)
130 stdcall VarUI1FromI2(long ptr)
131 stdcall VarUI1FromI4(long ptr)
132 stdcall VarUI1FromR4(long ptr)
...
...
dlls/oleaut32/varformat.c
View file @
e2511e19
...
...
@@ -2405,3 +2405,57 @@ HRESULT WINAPI VarFormatCurrency(LPVARIANT pVarIn, INT nDigits, INT nLeading,
}
return
hRet
;
}
/**********************************************************************
* VarMonthName [OLEAUT32.129]
*
* Print the specified month as localized name.
*
* PARAMS
* iMonth [I] month number 1..12
* fAbbrev [I] 0 - full name, !0 - abbreviated name
* dwFlags [I] flag stuff. only VAR_CALENDAR_HIJRI possible.
* pbstrOut [O] Destination for month name
*
* RETURNS
* Success: S_OK. pbstrOut contains the name.
* Failure: E_INVALIDARG, if any parameter is invalid.
* E_OUTOFMEMORY, if enough memory cannot be allocated.
*/
HRESULT
WINAPI
VarMonthName
(
INT
iMonth
,
INT
fAbbrev
,
ULONG
dwFlags
,
BSTR
*
pbstrOut
)
{
DWORD
localeValue
;
INT
size
;
WCHAR
*
str
;
if
((
iMonth
<
1
)
||
(
iMonth
>
12
))
return
E_INVALIDARG
;
if
(
dwFlags
)
FIXME
(
"Does not support dwFlags 0x%lx, ignoring.
\n
"
,
dwFlags
);
if
(
fAbbrev
)
localeValue
=
LOCALE_SABBREVMONTHNAME1
+
iMonth
-
1
;
else
localeValue
=
LOCALE_SMONTHNAME1
+
iMonth
-
1
;
size
=
GetLocaleInfoW
(
LOCALE_USER_DEFAULT
,
localeValue
,
NULL
,
0
);
if
(
!
size
)
{
FIXME
(
"GetLocaleInfo 0x%lx failed.
\n
"
,
localeValue
);
return
E_INVALIDARG
;
}
str
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
WCHAR
)
*
size
);
if
(
!
str
)
return
E_OUTOFMEMORY
;
size
=
GetLocaleInfoW
(
LOCALE_USER_DEFAULT
,
localeValue
,
str
,
size
);
if
(
!
size
)
{
FIXME
(
"GetLocaleInfo of 0x%lx failed in 2nd stage?!
\n
"
,
localeValue
);
HeapFree
(
GetProcessHeap
(),
0
,
str
);
return
E_INVALIDARG
;
}
*
pbstrOut
=
SysAllocString
(
str
);
HeapFree
(
GetProcessHeap
(),
0
,
str
);
if
(
!*
pbstrOut
)
return
E_OUTOFMEMORY
;
return
S_OK
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment