mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-03 11:30:18 +08:00

* fix: fix go test errors * Add flags to mac test * Run on all branches * Update PR workflow Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
27 lines
404 B
Go
27 lines
404 B
Go
//go:build windows
|
|
|
|
package w32
|
|
|
|
import (
|
|
"syscall"
|
|
"unsafe"
|
|
)
|
|
|
|
var (
|
|
modshlwapi = syscall.NewLazyDLL("shlwapi.dll")
|
|
|
|
procSHCreateMemStream = modshlwapi.NewProc("SHCreateMemStream")
|
|
)
|
|
|
|
func SHCreateMemStream(data []byte) (uintptr, error) {
|
|
ret, _, err := procSHCreateMemStream.Call(
|
|
uintptr(unsafe.Pointer(&data[0])),
|
|
uintptr(len(data)),
|
|
)
|
|
if ret == 0 {
|
|
return 0, err
|
|
}
|
|
|
|
return ret, nil
|
|
}
|