I'm building a windows application that uses a third-party DLL. In order to bundle everything into one executable, I have embedded said DLL as a go-bindata
asset into my binary.
Currently I drop the embedded DLL to the local file system when the application runs for the first time and then load it with syscall.NewLazyDLL()
. That works fine so far!
I was wondering, though, if anyone knows a solution that would allow me to load the DLL directly from the in-memory byte-slice that the go-bindata
asset provides, without first dropping the DLL as a file to the local filesystem.
I am currently looking at Go's runtime.syscall_loadlibrary()
method in syscall_windows.go
that syscall.NewLazyDLL
calls at some point but don't really have an idea where to go from here...
I found this question and this github repository that seem to deal with a similar issue, but all related to C/C++/C#.
Thoughts?