Author Topic: _WINDOWHANDLE should return an _OFFSET  (Read 6195 times)

0 Members and 1 Guest are viewing this topic.

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: _WINDOWHANDLE should return an _OFFSET
« Reply #15 on: June 14, 2020, 02:41:13 pm »
I hit the keyboard for so long and changed data types for so long that the stubborn program gave it up and started working!

Are you stealing my patented "Steve Coding Style"?  I swear, that's also EXACTLY how I end up getting things to swap over from 32-bit types to 64-bit types.  There's a set of rules in there somewhere about where padding comings into play and turns our 4-bytes into 8-bytes, but I swear, I have no idea what it is.  "Hitting the keyboard for so long and changing data types for so long that the stubborn program gives it up", is about the only way I know to make the process work.  :)

Here's a version which should work for you in both 32-bit and 64-bit versions of Windows: https://www.qb64.org/forum/index.php?topic=2689.msg119230#msg119230   (No credit due me at all here -- this is all you guys!  All I did was piece the parts together; you're the guys who sorted out what those parts needed to look like to make it work for us!  A monkey could've did my part.  :P)
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline Petr

  • Forum Resident
  • Posts: 1720
  • The best code is the DNA of the hops.
    • View Profile
Re: _WINDOWHANDLE should return an _OFFSET
« Reply #16 on: June 14, 2020, 03:36:02 pm »
:) Thank you, Steve. I made a few adjustments there and it already works in 32 bits, and also in 64 bits.

Offline SpriggsySpriggs

  • Forum Resident
  • Posts: 1145
  • Larger than life
    • View Profile
    • GitHub
Re: _WINDOWHANDLE should return an _OFFSET
« Reply #17 on: June 15, 2020, 12:31:39 pm »
You all are freaking amazing. Now most of my programs can be moved to 64 bit without needing to use PowerShell to call up an open file dialog. Excellent work, fellas.
Shuwatch!