-
Notifications
You must be signed in to change notification settings - Fork 18
Description
Hi) Are there any differences when using memory loading from a system function in terms of threads using and resource allocation? Faced the fact that in a number of experiments with cef (chromium embedded framework), launching three functions when linking in LDFLAGS and windows.NewLazyDll opens a new webview and loads url there. When using winloader.LoadFromMemory I get no errors, windows open, it opens a webview with a blank page (also works context-menu), but no URL opens. I've been investigating this issue for a week now, but I can't find any clear indication of the cause of this behavior.
// #cgo LDFLAGS: -L. -llibcef
/* C.cef_initialize(&settings.MainArgs, cefSettings, &settings.AppHandler, C.NULL) */
// winloader.LoadFromMemory(b)
/* cefInitialize.Call(
uint64(uintptr(unsafe.Pointer(&settings.MainArgs))),
uint64(uintptr(unsafe.Pointer(cefSettings))),
uint64(uintptr(unsafe.Pointer(&settings.AppHandler))),
uint64(uintptr(unsafe.Pointer(C.NULL))),
) */
// windows.NewLazyDLL("libcef.dll")
cefInitialize.Call(
uintptr(unsafe.Pointer(&settings.MainArgs)),
uintptr(unsafe.Pointer(cefSettings)),
uintptr(unsafe.Pointer(&settings.AppHandler)),
uintptr(unsafe.Pointer(C.NULL)),
)
I am not asking for help with cef, but maybe there are some subtleties that I do not know about and which could give me an idea of how to solve this problem. Unlike EDGE, the CEF library requires a lot of dlls in its directory and I am impressed by the idea of embedding them as resources in my application.