diff options
Diffstat (limited to 'tun/wintun/dll_fromrsrc_windows.go')
-rw-r--r-- | tun/wintun/dll_fromrsrc_windows.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tun/wintun/dll_fromrsrc_windows.go b/tun/wintun/dll_fromrsrc_windows.go index e6e393f..d107ba9 100644 --- a/tun/wintun/dll_fromrsrc_windows.go +++ b/tun/wintun/dll_fromrsrc_windows.go @@ -23,6 +23,7 @@ type lazyDLL struct { Name string mu sync.Mutex module *memmod.Module + onLoad func(d *lazyDLL) } func (d *lazyDLL) Load() error { @@ -50,6 +51,9 @@ func (d *lazyDLL) Load() error { } atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(&d.module)), unsafe.Pointer(module)) + if d.onLoad != nil { + d.onLoad(d) + } return nil } |