Commit 40c01320 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

winscard: Use string conversion helpers in SCardAddReaderToGroupA().

parent 906977f5
......@@ -115,27 +115,28 @@ HANDLE WINAPI SCardAccessStartedEvent(void)
return g_startedEvent;
}
LONG WINAPI SCardAddReaderToGroupA(SCARDCONTEXT context, LPCSTR reader, LPCSTR group)
LONG WINAPI SCardAddReaderToGroupA( SCARDCONTEXT context, const char *reader, const char *group )
{
LONG retval;
UNICODE_STRING readerW, groupW;
if(reader) RtlCreateUnicodeStringFromAsciiz(&readerW,reader);
else readerW.Buffer = NULL;
if(group) RtlCreateUnicodeStringFromAsciiz(&groupW,group);
else groupW.Buffer = NULL;
retval = SCardAddReaderToGroupW(context, readerW.Buffer, groupW.Buffer);
WCHAR *readerW = NULL, *groupW = NULL;
LONG ret;
RtlFreeUnicodeString(&readerW);
RtlFreeUnicodeString(&groupW);
TRACE( "%Ix, %s, %s\n", context, debugstr_a(reader), debugstr_a(group) );
return retval;
if (reader && !(readerW = ansi_to_utf16( reader ))) return SCARD_E_NO_MEMORY;
if (group && !(groupW = ansi_to_utf16( group )))
{
free( readerW );
return SCARD_E_NO_MEMORY;
}
ret = SCardAddReaderToGroupW( context, readerW, groupW );
free( readerW );
free( groupW );
return ret;
}
LONG WINAPI SCardAddReaderToGroupW(SCARDCONTEXT context, LPCWSTR reader, LPCWSTR group)
LONG WINAPI SCardAddReaderToGroupW( SCARDCONTEXT context, const WCHAR *reader, const WCHAR *group )
{
FIXME("%x %s %s\n", (unsigned int) context, debugstr_w(reader), debugstr_w(group));
FIXME( "%Ix, %s, %s\n", context, debugstr_w(reader), debugstr_w(group) );
return SCARD_S_SUCCESS;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment