Rev 405 | Rev 415 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 405 | Rev 406 | ||
---|---|---|---|
Line 119... | Line 119... | ||
119 | typedef UNICODE_STRING* PUNICODE_STRING; |
119 | typedef UNICODE_STRING* PUNICODE_STRING; |
120 | typedef CONST char* PCSZ; |
120 | typedef CONST char* PCSZ; |
121 | 121 | ||
122 | // ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
122 | // ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
123 | // Supplement created by Daniel Marschall |
123 | // Supplement created by Daniel Marschall |
- | 124 | // Attention: These supplements are VERY simple and they ONLY accept ASCII! |
|
124 | // ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
125 | // ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
125 | 126 | ||
126 | NTSTATUS WINAPI _RtlCreateUnicodeStringFromAsciiz(PUNICODE_STRING target, LPCSTR src) |
127 | NTSTATUS WINAPI _RtlCreateUnicodeStringFromAsciiz(PUNICODE_STRING target, LPCSTR src) |
127 | { |
128 | { |
128 | // Simple implementation by Daniel Marschall |
129 | // Simple implementation by Daniel Marschall |
Line 141... | Line 142... | ||
141 | } |
142 | } |
142 | 143 | ||
143 | return STATUS_SUCCESS; |
144 | return STATUS_SUCCESS; |
144 | } |
145 | } |
145 | 146 | ||
- | 147 | NTSTATUS WINAPI _InplaceRtlUpcaseUnicodeString(PUNICODE_STRING str) { |
|
- | 148 | int i; |
|
- | 149 | ||
- | 150 | for (i = 0; i < (int)(str->Length / sizeof(WCHAR)); i++) { |
|
- | 151 | str->Buffer[i] = toupper(str->Buffer[i]); |
|
- | 152 | } |
|
- | 153 | ||
- | 154 | return STATUS_SUCCESS; |
|
- | 155 | } |
|
- | 156 | ||
146 | // ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
157 | // ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
147 | // Source: https://github.com/reactos/wine/blob/master/dlls/ntdll/rtlstr.c (renamed function) |
158 | // Source: https://github.com/reactos/wine/blob/master/dlls/ntdll/rtlstr.c (renamed function) |
148 | // ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
159 | // ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
149 | 160 | ||
150 | NTSTATUS WINAPI _RtlCharToInteger( |
161 | NTSTATUS WINAPI _RtlCharToInteger( |
Line 514... | Line 525... | ||
514 | return STATUS_SUCCESS; |
525 | return STATUS_SUCCESS; |
515 | } |
526 | } |
516 | else |
527 | else |
517 | { |
528 | { |
518 | _RtlCreateUnicodeStringFromAsciiz(str, name); |
529 | _RtlCreateUnicodeStringFromAsciiz(str, name); |
- | 530 | ||
- | 531 | // Fix by Daniel Marschall: Added RtlUpcaseUnicodeString for get_res_nameA, like it was done for get_res_nameW |
|
- | 532 | // RtlUpcaseUnicodeString(str, str, FALSE); |
|
- | 533 | // For our implementation, this simple inplace function works: |
|
- | 534 | _InplaceRtlUpcaseUnicodeString(str); |
|
- | 535 | ||
519 | return STATUS_SUCCESS; |
536 | return STATUS_SUCCESS; |
520 | } |
537 | } |
521 | } |
538 | } |
522 | 539 | ||
523 | /* |
540 | /* |