func (s *Sciter) LoadFile(filename string) error {
	ret := C.SciterLoadFile(s.hwnd, StringToWcharPtr(filename))
	if ret == 0 {
		return fmt.Errorf("LoadFile with: %s failed", filename)
	}
	return nil
}
BOOL SciterLoadFile (HWINDOW hWndSciter, LPCWSTR filename) ;//{ return SAPI()->SciterLoadFile (hWndSciter,filename); }
package sciter
import "C"
import (
	"fmt"
	"log"
	"runtime"
	"strings"
	"unsafe"
)
type Sciter struct {
	hwnd C.HWINDOW
	callbacks map[*CallbackHandler]struct{}
	*eventMapper
	har C.HSARCHIVE
}
var (
	BAD_HWINDOW C.HWINDOW = nil
)
func Wrap(hwnd C.HWINDOW) *Sciter {
	s := &Sciter{
		hwnd:      hwnd,
		callbacks: make(map[*CallbackHandler]struct{}),
	}
	return s
}
func ClassName() string {
	cname := (*uint16)(unsafe.Pointer(C.SciterClassName()))
	return Utf16ToString(cname)
}
func Version(major bool) uint {
	var v C.UINT
	if major {
		v = C.SciterVersion(C.BOOL(1))
	} else {
		v = C.SciterVersion(C.BOOL(0))
	}
	return uint(v)
}
func VersionAsString() string {
	major := Version(true)
	minor := Version(false)
	return fmt.Sprintf("0x%x %x", major, minor)
}
func (s *Sciter) GetHwnd() C.HWINDOW {
	return s.hwnd
}
func SetDLL(dir string) {
	C.SCITER_DLL_PATH = C.CString(dir)
}
func (s *Sciter) DataReady(uri string, data []byte) bool {
	var pData C.LPCBYTE
	if len(data) > 0 {
		pData = (C.LPCBYTE)(unsafe.Pointer(&data[0]))
	}
	ret := C.SciterDataReady(s.hwnd, StringToWcharPtr(uri), pData, C.UINT(len(data)))
	if ret == 0 {
		return false
	}
	loadedUri[uri] = data
	return true
}
var (
	loadedUri = map[string][]byte{}
)
func (s *Sciter) DataReadyAsync(uri string, data []byte, requestId unsafe.Pointer) bool {
	var pData C.LPCBYTE
	if len(data) > 0 {
		pData = (C.LPCBYTE)(unsafe.Pointer(&data[0]))
	}
	curi := StringToWcharPtr(uri)
	cdataLength := C.UINT(len(data))
	crequestId := C.LPVOID(requestId)
	ret := C.SciterDataReadyAsync(s.hwnd, curi, pData, cdataLength, crequestId)
	if ret == 0 {
		return false
	}
	return true
}