api FindWindowA in pb10

i try this simple code in pb10 and do not find the window.... i try the same code in pb8 and it works(return l_handle<>0):

//global external
FUNCTION ulong FindWindowA(ulong classname,string windowname) Library "user32.dll"

//script
ulong l_handle
string ls_wname

open (w1) //window with the title "Ventana de Pendientes"
ls_wname = "Ventana de Pendientes"  
l_handle = FindWindowA(0, ls_wname)
messagebox('WindowHandler',string(l_handle))


i try migrate an app from pb8 to pb10 but i use a lot of api calls... but my first trouble was most of the api calls do not work

what's wrong??

i'm using pb10.2.0 Build 8050, pb8.0.4 Build 10923

bowsermxliAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

splateauxCommented:
We're using version 9, and have many API calls that appear to work as they did in version 8.  Worst case situation you could move to version 9, and give version 10 some time to get it's wrinkle's ironed out.
gajender_99Commented:
hi

change you function with this little change

FUNCTION ulong FindWindowA(ulong classname,string windowname) Library "user32.dll"  alias for "findwindowA;Ansi"

this is the change in pb10

Gajender

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
gajender_99Commented:
;ansi Required if the function passes a string as an argument or returns a string that uses ANSI encoding. Even if you use the default name for an ANSI function, you must always use the ALIAS keyword if you want to specify that the string uses ANSI encoding, because you must qualify the ALIAS with the ansi keyword


Gajender

michaelstoffelCommented:
To expand on Gajender's reply, PB10 is UNICODE.  Arguably the biggest change in PB 10 and very well documented in various places on the web along with the various issues it will cause.  An alternative to using FindWindowA is to use the Unicode version of the API which I believe is simply FindWindow.

Mike
bowsermxliAuthor Commented:
it works... only thing is the api calls are case sensitive then the right declare was :

FUNCTION ulong FindWindowA(ulong classname,string windowname) Library "user32.dll"  alias for "FindWindowA;Ansi"

was an error in  ...  - alias for "findwindowA;Ansi" -


....thank's
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Editors IDEs

From novice to tech pro — start learning today.