Advertisement
FlyFar

utils.h

Jul 25th, 2023
625
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.67 KB | Cybersecurity | 0 0
  1. #ifndef RUNNER_UTILS_H_
  2. #define RUNNER_UTILS_H_
  3.  
  4. #include <string>
  5. #include <vector>
  6.  
  7. // Creates a console for the process, and redirects stdout and stderr to
  8. // it for both the runner and the Flutter library.
  9. void CreateAndAttachConsole();
  10.  
  11. // Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string
  12. // encoded in UTF-8. Returns an empty std::string on failure.
  13. std::string Utf8FromUtf16(const wchar_t* utf16_string);
  14.  
  15. // Gets the command line arguments passed in as a std::vector<std::string>,
  16. // encoded in UTF-8. Returns an empty std::vector<std::string> on failure.
  17. std::vector<std::string> GetCommandLineArguments();
  18.  
  19. #endif  // RUNNER_UTILS_H_
Tags: Header Utils
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement