Guest User

Untitled

a guest
Jan 22nd, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <windows.h>
  3. #define KEY "SOFTWARE\\ratz\\RRDC\\"
  4.  
  5. int main(){
  6. long ret;
  7. unsigned char *res;
  8. DWORD size;
  9. HKEY hkey;
  10. ret = RegOpenKeyEx(HKEY_LOCAL_MACHINE, KEY, 0, KEY_QUERY_VALUE, &hkey);
  11. (ret = 0) ? (ret = RegGetValue(hkey, KEY, "Pfad", 0x00000002, NULL, res, size)) : printf("%ld\n", ret);
  12. (ret = 0) ? ((unsigned char *)malloc(size) && RegGetValue(hkey, KEY, "Pfad", 0x00000002, NULL, res, size)) : printf("%ld\n", ret);
  13. printf("%s\n", res);
  14. }
  15.  
  16. C:\Users\Administrator\Desktop\RamDiskCleaner>C:\MinGW\bin\mingw32-gcc.exe -o en
  17. vision3.exe envision3.c
  18. C:\Users\ADMINI~1\AppData\Local\Temp\ccEubxmE.o:envision3.c:(.text+0x89): undefi
  19. ned reference to `RegGetValue'
  20. C:\Users\ADMINI~1\AppData\Local\Temp\ccEubxmE.o:envision3.c:(.text+0xf6): undefi
  21. ned reference to `RegGetValue'
  22. collect2: ld returned 1 exit status
Add Comment
Please, Sign In to add comment