Convert a `PWSTR` to an `Option `. # Safety The pointer must be valid or null.
(p: PWSTR)
| 24 | /// |
| 25 | /// The pointer must be valid or null. |
| 26 | unsafe fn pwstr_to_string(p: PWSTR) -> Option<String> { |
| 27 | if p.is_null() { |
| 28 | None |
| 29 | } else { |
| 30 | unsafe { p.to_string().ok() } |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | /// Parse a double-null-terminated multi-string into individual strings. |
| 35 | /// |
no outgoing calls
no test coverage detected