()
| 48 | } |
| 49 | |
| 50 | func (i *OSIntegration) loadDLL() error { |
| 51 | // Find path to the dll. |
| 52 | file, err := i.instance.BinaryUpdates().GetFile("portmaster-core.dll") |
| 53 | if err != nil { |
| 54 | return err |
| 55 | } |
| 56 | // Load the DLL. |
| 57 | i.os.dll, err = windows.LoadDLL(file.Path()) |
| 58 | if err != nil { |
| 59 | return fmt.Errorf("failed to load dll: %q", err) |
| 60 | } |
| 61 | |
| 62 | // Enumerate all needed dll functions. |
| 63 | i.os.etwFunctions, err = initializeETW(i.os.dll) |
| 64 | if err != nil { |
| 65 | return err |
| 66 | } |
| 67 | |
| 68 | // Notify listeners |
| 69 | i.OnInitializedEvent.Submit(struct{}{}) |
| 70 | |
| 71 | return nil |
| 72 | } |
| 73 | |
| 74 | // CleanUp releases any resources allocated during initialization. |
| 75 | func (i *OSIntegration) CleanUp() error { |
no test coverage detected