Can anybody think of any reason why building with Wails would interfere with go-ole
(ie windows COM)?
#1677
campbellwmorgan
started this conversation in
General
Replies: 1 comment 2 replies
-
Just to reply to my own comment. I realise this must be because wails also uses And i've resolved my issue by just ignoring the error as has been done in wails. So far everything seems to work fine :) |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Background
I've recently added some code that uses the go-ole library to make some windows COM calls.
When I build my project just from the go build function without the flags
desktop,production
or withoutdev
my calls work fine (via a cli command). They also work fine when the GUI is running.However, when I build with wails using the new
-windowsconsole
flag (yes thank you for adding that!!) the initialization of my ole interface fails withInvalidFunction
. (Specifically i call https://github.com/go-ole/go-ole/blob/bac9a21098b9908a7260c558a678008c6e4fead4/com.go#L80)Interestingly the failure only occurs when executing the executable from the command line. If called via the GUI, it works fine
Question
Does Wails internally use the windows COM interface for something? Does it hook into any windows interfaces that may be overwriting a reference to something?
Beta Was this translation helpful? Give feedback.
All reactions