It appears that you are using an old version of the n_bcrypt object from Roland Smith's TopWizProgramming web site.
I compared the exported source for the version in the .pbl you provided against the exported source of the current/latest version (last changed on Sept. 30, 2021), and there are many changes, mainly regarding the datatypes of values/arguments used for WinAPI handles and pointers (memory addresses).
Apps built from newer versions of Visual Studio, such as PowerBuilder apparently have more stringent checking of datatypes, as the Community has seen multiple questions/issues similar to yours... and the root cause turns out to be the more stringent datatype checking that the underlying runtime libraries now perform. There can be a variety of reasons why code that works in an older version no longer works in a newer version, so your supposition that this shouldn't happen because things work in an older version is naive and incorrect.
I suggest you download the latest version of the BCrypt free code example app from the TopWizProgramming web site, export the n_bcrypt object from it and import it into the PB 2022 version of your app. Here's the link:
https://www.topwizprogramming.com/freecode_bcrypt.html
One final suggestion for future reference: Providing a .pbl, by itself, makes it more difficult to investigate an issue than it should be. If you are going to include PB objects in your posts, please instead either provide a zip'd small, example app (including the .pbl, .pbt, & .pbw) that exhibits the problem/issue, or zip the exported object(s) to make it as easy as possible for people in the Community to look into the problem. We want to help and like to help, and we would appreciate you making it easier for us to help you.
Best regards, John