fork download
  1. #include <windows.h>
  2. #include <stdio.h>
  3. #include "registry.h"
  4.  
  5. #pragma comment(lib, "user32.lib")
  6.  
  7. int main(int argc, char *argv[])
  8. {
  9. char key[] = "xyz";
  10. BYTE value[] = "123";
  11. char buffer[MAX_PATH];
  12. DWORD dwSize = 0;
  13.  
  14. if (!CreateBinKey(key, value, 3))
  15. {
  16. MessageBox(NULL, TEXT("Error while CreateBinKey"), TEXT("Error"), MB_OK);
  17. }
  18.  
  19. ZeroMemory(buffer, MAX_PATH);
  20. dwSize = 3;
  21. if (GetBinKey(key, buffer, dwSize))
  22. {
  23. printf("%s\n", buffer);
  24. }
  25. else
  26. {
  27. MessageBox(NULL, TEXT("Error while GetBinKey"), TEXT("Error"), MB_OK);
  28. }
  29. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c:1:21: fatal error: windows.h: No such file or directory
compilation terminated.
stdout
Standard output is empty