mirror of
https://github.com/lwch/natpass.git
synced 2024-04-21 12:41:54 +00:00
修正vnc发送数据类型问题
This commit is contained in:
@@ -30,5 +30,6 @@ func captureOK(conn *websocket.Conn, bits, width, height int, data []byte) {
|
||||
Data: data,
|
||||
},
|
||||
}
|
||||
data, _ = proto.Marshal(&msg)
|
||||
conn.WriteMessage(websocket.BinaryMessage, data)
|
||||
}
|
||||
|
||||
@@ -103,7 +103,9 @@ func createWorker(confDir string, tk windows.Token) (*Process, error) {
|
||||
startup.Flags = windows.STARTF_USESHOWWINDOW
|
||||
cmd := windows.StringToUTF16Ptr(dir + fmt.Sprintf(" -conf %s -action vnc.worker -vport %d", confDir, port))
|
||||
if tk == 0 {
|
||||
err = windows.CreateProcess(nil, cmd, nil, nil, false, windows.DETACHED_PROCESS, nil, nil, &startup, &process)
|
||||
// only for debug
|
||||
startup.Flags = 0
|
||||
err = windows.CreateProcess(nil, cmd, nil, nil, false, windows.CREATE_NEW_CONSOLE, nil, nil, &startup, &process)
|
||||
} else {
|
||||
err = windows.CreateProcessAsUser(tk, nil, cmd, nil, nil, false, windows.DETACHED_PROCESS, nil, nil, &startup, &process)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user