Skip to content

Commit bac3250

Browse files
committed
Oleauth32 fix
1 parent 0928ddb commit bac3250

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

oleaut32/oleauth32_methods.go

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
// Copyright 2010 The win Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style
3+
// license that can be found in the LICENSE file.
4+
5+
// +build windows
6+
7+
package oleaut32
8+
9+
import (
10+
"fmt"
11+
"syscall"
12+
"unsafe"
13+
14+
"github.com/D4v1dW3bb/winapi/win"
15+
)
16+
117
func StringToBSTR(value string) *uint16 /*BSTR*/ {
218
// IMPORTANT: Don't forget to free the BSTR value when no longer needed!
319
return SysAllocString(value)
@@ -22,7 +38,7 @@ func VariantI4ToInt(value *VAR_I4) int32 {
2238
}
2339

2440
func BoolToVariantBool(value bool) *VAR_BOOL {
25-
return &VAR_BOOL{vt: VT_BOOL, boolVal: VARIANT_BOOL(BoolToBOOL(value))}
41+
return &VAR_BOOL{vt: VT_BOOL, boolVal: VARIANT_BOOL(win.BoolToBOOL(value))}
2642
}
2743

2844
func VariantBoolToBool(value *VAR_BOOL) bool {
@@ -234,4 +250,4 @@ func (v *VARIANT) SetPSafeArray(value *SAFEARRAY, elementVt VARTYPE) {
234250
v.Vt = VT_ARRAY | elementVt
235251
p := (*VAR_PSAFEARRAY)(unsafe.Pointer(v))
236252
p.parray = value
237-
}
253+
}

0 commit comments

Comments
 (0)