Giter Club home page Giter Club logo

go-winloader's People

Contributors

jchv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

go-winloader's Issues

UPX compressed DLLs

Hi there! Firstly, awesome job on the project!

Was wondering if you had any intentions in supporting UPX compressed DLLs as there's currently an interesting trade off between shipping a compressed DLL with your application or embedding a non-compressed version that's usually 2x the size. It currently crashes with the following stack trace:

C:\Users\leaan\Documents\GitHub\go-winloader\cmd\demo>demo.exe tiny2.dll
Exception 0xc0000005 0x8 0x27e734414d0 0x27e734414d0
PC=0x27e734414d0

syscall.Syscall(0x27e73461310, 0x3, 0x27e73440000, 0x1, 0x0, 0x0, 0x0, 0x0)
        C:/Program Files/Go/src/runtime/syscall_windows.go:330 +0xe9
github.com/jchv/go-winloader/internal/winloader.Proc.Call(0x27e73461310, 0xc00012e330, 0x3, 0x3, 0x18, 0x8a69a0,
 0x27e73461301, 0xc00012e330)
        C:/Users/leaan/Documents/GitHub/go-winloader/internal/winloader/loader_windows.go:24 +0x22f
github.com/jchv/go-winloader/internal/memloader.(*Loader).LoadMem(0xc000162390, 0xc000168000, 0xbbea, 0xbbeb, 0x
bbeb, 0x0, 0x0, 0xc000106000)
        C:/Users/leaan/Documents/GitHub/go-winloader/internal/memloader/loader.go:239 +0xa88
github.com/jchv/go-winloader.LoadFromMemory(...)
        C:/Users/leaan/Documents/GitHub/go-winloader/loader_windows.go:25
main.main()
        C:/Users/leaan/Documents/GitHub/go-winloader/cmd/demo/main.go:18 +0x167
rax     0x27e734414d0
rbx     0x1000
rcx     0x27e73440000
rdi     0x27e73440000
rsi     0x27e7344a038
rbp     0x7ff99295bc70
rsp     0x7f359ffd48
r8      0x0
r9      0x4
r10     0x0
r11     0x246
r12     0x1
r13     0x1
r14     0x23
r15     0xffffffffffffffff
rip     0x27e734414d0
rflags  0x10206
cs      0x33
fs      0x53
gs      0x2b

Link multiple DLLs loaded into memory

Is it possible to link multiple DLLs loaded into memory? The a.dll library uses a function from b.dll. Having packed a.dll into .go constant, we can load it from memory, but this makes no sense if it is not loaded without finding b.dll

Differences in work from windows.NewLazyDLL

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.