#8 Can't open port

Closed
opened 2 years ago by jsnyder886 · 6 comments

Hello!
This project would be exactly what I need to overcome some challenges with my streaming setup at my church, but unfortunately I cannot get the DLL to open a port. I'm running windows 11. I've turned off windows firewall for troubleshooting. It just keeps popping up to say failed to open port when I try to load your example script. The DLL appears to load as the result is 0 when called. It's the actual action of opening the port that fails. I've tried too many different ports to count in an effort to eliminate a potential port conflict as the source of the error.

Any ideas or suggestions I can try?

Hello! This project would be exactly what I need to overcome some challenges with my streaming setup at my church, but unfortunately I cannot get the DLL to open a port. I'm running windows 11. I've turned off windows firewall for troubleshooting. It just keeps popping up to say failed to open port when I try to load your example script. The DLL appears to load as the result is 0 when called. It's the actual action of opening the port that fails. I've tried too many different ports to count in an effort to eliminate a potential port conflict as the source of the error. Any ideas or suggestions I can try?
Ludwig commented 2 years ago
Poster
Owner

Hi!
Hm, could you check for the value that OSC2AHK.dll\open returns? There could be a hint in it:
0: Port opened
1: handle or port invalid
2: failed to open port (deeper in the networking functions)
3: port probably already opened by OSC2AHK

It totally could be a Windows 11 problem, until now I only tested it in Win10.

Hi! Hm, could you check for the value that `OSC2AHK.dll\open` returns? There could be a hint in it: 0: Port opened 1: handle or port invalid 2: failed to open port (deeper in the networking functions) 3: port probably already opened by OSC2AHK It totally could be a Windows 11 problem, until now I only tested it in Win10.
Poster

So here are my results...

DllCall("LoadLibrary", "Str", "OSC2AHK.dll", "Ptr")

That returns 0.

DllCall("OSC2AHK.dll\open", UInt, hWnd, UInt, 7002)

That returns empty or null.

Thanks for trying to help me, it's greatly appreciated!

So here are my results... DllCall("LoadLibrary", "Str", "OSC2AHK.dll", "Ptr") That returns 0. DllCall("OSC2AHK.dll\open", UInt, hWnd, UInt, 7002) That returns empty or null. Thanks for trying to help me, it's greatly appreciated!
Poster

So I've been able to dig a little deeper with some of the thoughts that you've offered. I was able to run the "GetLastError" dll function and got 193 as the result. From what I've been able to find on google, it would seem there is perhaps a version issue between 32bit vs 64 bit. I've confirmed that the autohotkey version that I'm running is indeed 32bit, but I have no way to confirm if the osc dll was compiled for 32 or 64 bit. It could also entirely be that I'm way off base, but it seemed a reasonable place to start digging.

Any thoughts?

Thanks again in advance!

So I've been able to dig a little deeper with some of the thoughts that you've offered. I was able to run the "GetLastError" dll function and got 193 as the result. From what I've been able to find on google, it would seem there is perhaps a version issue between 32bit vs 64 bit. I've confirmed that the autohotkey version that I'm running is indeed 32bit, but I have no way to confirm if the osc dll was compiled for 32 or 64 bit. It could also entirely be that I'm way off base, but it seemed a reasonable place to start digging. Any thoughts? Thanks again in advance!
Poster

Alright, well I decided to just try the 64 bit version of autohotkey and I get 0 for my result for open and addlistener now. Not sure if there's anything for you to change in the osc2ahk dll file or not, but if anyone's having a similar issue, at first blush this seems to have at least let me connect at this point. I will do further testing and see what I can determine as to if it works as expected now that I've gotten this far. I'll update this thread when that's complete.

Alright, well I decided to just try the 64 bit version of autohotkey and I get 0 for my result for open and addlistener now. Not sure if there's anything for you to change in the osc2ahk dll file or not, but if anyone's having a similar issue, at first blush this seems to have at least let me connect at this point. I will do further testing and see what I can determine as to if it works as expected now that I've gotten this far. I'll update this thread when that's complete.
Poster

Everything is working as expected at this point, thanks so much! It was definately an issue of my computer running the 32bit version of autohotkey when it needed to be the 64 bit version. I ran into some other trouble when I forgot to add Gui +LastFound to my script. Thanks for pointing me in the right direction!

Everything is working as expected at this point, thanks so much! It was definately an issue of my computer running the 32bit version of autohotkey when it needed to be the 64 bit version. I ran into some other trouble when I forgot to add Gui +LastFound to my script. Thanks for pointing me in the right direction!
jsnyder886 closed this issue 2 years ago
Ludwig commented 2 years ago
Poster
Owner

Great to hear that your issue has been resolved! The DLL totally was compiled for 64bit only, so that was the problem. I'll add a not to the documentation about that!

Great to hear that your issue has been resolved! The DLL totally was compiled for 64bit only, so that was the problem. I'll add a not to the documentation about that!
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.