Convert ansi to wide chars.
| 114 | |
| 115 | // Convert ansi to wide chars. |
| 116 | VOID shellcode::ansi_to_wide(PCHAR str, PWCHAR out, size_t size) |
| 117 | { |
| 118 | // Test if the buffer is zero-length. |
| 119 | size /= sizeof(WCHAR); |
| 120 | if (!size) return; |
| 121 | |
| 122 | // Copy the chars. |
| 123 | while (--size && *str) { |
| 124 | *out++ = (WCHAR)*str++; |
| 125 | }; |
| 126 | |
| 127 | // Append NULL. |
| 128 | *out = 0; |
| 129 | }; |
| 130 | |
| 131 | // Copy string between to buffers. |
| 132 | VOID shellcode::wstr_cpy(PWSTR str1, PCWSTR str2, size_t length) |
nothing calls this directly
no outgoing calls
no test coverage detected