MCPcopy Create free account
hub / github.com/bobranten/Ext4Fsd / Ext2AnsiToUnicode

Function Ext2AnsiToUnicode

Ext2Mgr/enumDisk.cpp:4490–4514  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4488 */
4489
4490VOID
4491Ext2AnsiToUnicode(
4492 CHAR * AnsiName,
4493 WCHAR* UniName,
4494 USHORT UniLength
4495 )
4496{
4497 USHORT NameLength = 0;
4498 NT::ANSI_STRING AnsiFilespec;
4499 NT::UNICODE_STRING UnicodeFilespec;
4500
4501 memset(UniName, 0, sizeof(WCHAR) * UniLength);
4502
4503 NameLength = (USHORT)strlen(AnsiName);
4504 ASSERT(NameLength < UniLength);
4505
4506 AnsiFilespec.MaximumLength = AnsiFilespec.Length = NameLength;
4507 AnsiFilespec.Buffer = AnsiName;
4508
4509 UnicodeFilespec.MaximumLength = UniLength * 2;
4510 UnicodeFilespec.Length = 0;
4511 UnicodeFilespec.Buffer = (PWSTR)UniName;
4512
4513 NT::RtlAnsiStringToUnicodeString(&UnicodeFilespec, &AnsiFilespec, FALSE);
4514}
4515
4516BOOL
4517Ext2VolumeArrivalNotify(PCHAR VolumePath)

Callers 3

Ext2VolumeArrivalNotifyFunction · 0.85
Ext2SetVolumeMountPointFunction · 0.85
Ext2QueryMountPointFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected