[service] Fix module failure when dll is missing

This commit is contained in:
Vladimir Stoilov
2024-12-02 14:02:49 +02:00
parent ef0995b1f7
commit 2a9d75433f
5 changed files with 60 additions and 22 deletions

View File

@@ -19,8 +19,8 @@ type ETWFunctions struct {
stopOldSession *windows.Proc
}
func initializeETW(dll *windows.DLL) (ETWFunctions, error) {
var functions ETWFunctions
func initializeETW(dll *windows.DLL) (*ETWFunctions, error) {
functions := &ETWFunctions{}
var err error
functions.createState, err = dll.FindProc("PM_ETWCreateState")
if err != nil {