Commit 5d0dd06d authored by Kieran Colford's avatar Kieran Colford Committed by Alex Brainman

windows: document panics in LazyProc

Some of LazyProc's methods will panic if the procedure cannot be
found. This patch documents that fact.

Change-Id: If446a61e001ae04eaba0ff08b512df4def8a00b7
Reviewed-on: https://go-review.googlesource.com/73450Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
Reviewed-by: 's avatarAlex Brainman <alex.brainman@gmail.com>
parent 9e4fff1f
......@@ -289,6 +289,7 @@ func (p *LazyProc) mustFind() {
// Addr returns the address of the procedure represented by p.
// The return value can be passed to Syscall to run the procedure.
// It will panic if the procedure cannot be found.
func (p *LazyProc) Addr() uintptr {
p.mustFind()
return p.proc.Addr()
......@@ -297,7 +298,7 @@ func (p *LazyProc) Addr() uintptr {
//go:uintptrescapes
// Call executes procedure p with arguments a. It will panic, if more then 15 arguments
// are supplied.
// are supplied. It will also panic if the procedure cannot be found.
//
// The returned error is always non-nil, constructed from the result of GetLastError.
// Callers must inspect the primary return value to decide whether an error occurred
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment