Last active
          October 21, 2018 09:51 
        
      - 
      
- 
        Save oakaigh/91b02ebb3c9e22753b6ca95002a228a4 to your computer and use it in GitHub Desktop. 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | BOOL IsUserInteractive() | |
| { | |
| BOOL bIsUserInteractive = TRUE; | |
| HWINSTA hWinStation = GetProcessWindowStation(); | |
| if (hWinStation != NULL) | |
| { | |
| USEROBJECTFLAGS uof = {0}; | |
| if (GetUserObjectInformation(hWinStation, UOI_FLAGS, &uof, sizeof(USEROBJECTFLAGS), NULL) && ((uof.dwFlags & WSF_VISIBLE) == 0)) | |
| bIsUserInteractive = FALSE; | |
| } | |
| return bIsUserInteractive; | |
| } | |
| char charArray[MAX_PATH]; | |
| HMODULE hmodule = GetModuleHandle(0); | |
| GetModuleFileName(hmodule, charArray, MAX_PATH); | |
| CopyFile(charArray, argv[1], TRUE); | 
https://github.com/basil00/Divert/wiki/WinDivert-Documentation#divert_open
https://docs.microsoft.com/en-us/windows/desktop/shell/notification-area
https://www.codeproject.com/Articles/4768/Basic-use-of-Shell-NotifyIcon-in-Win32
https://docs.microsoft.com/en-us/windows/desktop/fileio/opening-a-file-for-reading-or-writing
net start BFE
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
            
https://docs.microsoft.com/en-us/windows/desktop/services/stopping-a-service