File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -43,8 +43,8 @@ type DLL struct {
4343// LoadDLL loads DLL file into memory.
4444//
4545// Warning: using LoadDLL without an absolute path name is subject to
46- // DLL preloading attacks. To safely load a system DLL, use LazyDLL
47- // with System set to true, or use LoadLibraryEx directly.
46+ // DLL preloading attacks. To safely load a system DLL, use [NewLazySystemDLL],
47+ // or use [ LoadLibraryEx] directly.
4848func LoadDLL (name string ) (dll * DLL , err error ) {
4949 namep , err := UTF16PtrFromString (name )
5050 if err != nil {
@@ -271,6 +271,9 @@ func (d *LazyDLL) NewProc(name string) *LazyProc {
271271}
272272
273273// NewLazyDLL creates new LazyDLL associated with DLL file.
274+ //
275+ // Warning: using NewLazyDLL without an absolute path name is subject to
276+ // DLL preloading attacks. To safely load a system DLL, use [NewLazySystemDLL].
274277func NewLazyDLL (name string ) * LazyDLL {
275278 return & LazyDLL {Name : name }
276279}
You can’t perform that action at this time.
0 commit comments