cmdSend.cpp 305 B

12345678910111213141516171819
  1. #include "Win32.h"
  2. #include "ID.h"
  3. #include "Function.h"
  4. //Send
  5. bool SendCommand(LPCSTR command)
  6. {
  7. DWORD size = strlen(command);
  8. if (WriteFile(UIw_key, command, size, NULL, NULL) != 0)
  9. {
  10. FlushFileBuffers(UIw_key);
  11. return true;
  12. }
  13. else
  14. {
  15. Err(_T("Failed to send command!"));
  16. return false;
  17. }
  18. }