Lines Matching refs:Dll
14 // DLLError describes reasons for DLL load failures.
33 // A DLL implements access to a single DLL.
34 type DLL struct {
39 // LoadDLL loads the named DLL file into memory.
41 // If name is not an absolute path and is not a known system DLL used by
42 // Go, Windows will search for the named DLL in many locations, causing
43 // potential DLL preloading attacks.
47 func LoadDLL(name string) (*DLL, error) {
66 d := &DLL{
74 func MustLoadDLL(name string) *DLL {
82 // FindProc searches DLL d for procedure named name and returns *Proc
84 func (d *DLL) FindProc(name string) (proc *Proc, err error) {
98 Dll: d,
106 func (d *DLL) MustFindProc(name string) *Proc {
114 // Release unloads DLL d from memory.
115 func (d *DLL) Release() (err error) {
119 // A Proc implements access to a procedure inside a DLL.
121 Dll *DLL
180 // A LazyDLL implements access to a single DLL.
181 // It will delay the load of the DLL until the first
185 // LazyDLL is subject to the same DLL preloading attacks as documented
192 dll *DLL // non nil once DLL is loaded
196 // Load loads DLL file d.Name into memory. It returns an error if fails.
197 // Load will not try to load DLL, if it is already loaded into memory.
200 // if d.dll == nil {
201 if atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(&d.dll))) == nil {
204 if d.dll == nil {
205 dll, e := LoadDLL(d.Name)
210 // d.dll = dll
211 atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(&d.dll)), unsafe.Pointer(dll))
228 return uintptr(d.dll.Handle)
231 // NewProc returns a LazyProc for accessing the named procedure in the DLL d.
236 // NewLazyDLL creates new LazyDLL associated with DLL file.
250 // Find searches DLL for procedure named p.Name. It returns
264 proc, e := p.l.dll.FindProc(p.Name)