直接从Go-bindata字节片加载DLL
我正在构建使用第三方DLL的Windows应用程序。为了将所有内容捆绑到一个可执行文件中,我将DLL嵌入为go-bindata
资产中的dll中。
当前,当应用程序首次运行时,我将嵌入式DLL放到本地文件系统中,然后加载syscall.newlazydll()
。到目前为止的工作正常!
不过,我想知道,如果有人知道一个解决方案,可以让我直接从内存字节板中加载dll,而go-bindata
资产提供了,而无需先将DLL作为一个文件到本地文件系统。
我目前正在查看syscall_windows.go
syscall.syscall.newlazydll newlazydll 在某个时候打电话,但在某个时候并没有真正并不是真的没有有一个想法从这里去哪里...
我找到了这个问题 and github储存库这似乎涉及一个类似的问题,但都与C/C ++/C ++/有关C#。
想法?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论