Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: Replacing ToAnsi and ToOEM

  1. #11
    Join Date
    Feb 2009
    Location
    Stuart, FL
    Posts
    5,322

    Default Re: Replacing ToAnsi and ToOEM

    in your code after calling szGlobalAddAtom you return true all the time. You should check the return value. It could return an atom or 0 in case of an error so correct would be

    Code:
       Move (szGlobalAddAtom(sAtom)) to hAtom
       Function_Return (hAtom <> 0)
    Michael Salzlechner
    StarZen Technologies, Inc
    http.://www.starzen.com

    IT Director at Balloons Everywhere

    Development Blog
    http://www.salzlechner.com/dev

    DataFlex Package Manager (aka Nuget for DataFlex)
    http://windowsdeveloper.com/dfPackage

  2. #12
    Join Date
    Feb 2009
    Location
    Cayman Islands
    Posts
    3,969

    Default Re: Replacing ToAnsi and ToOEM

    Quote Originally Posted by starzen View Post
    in your code after calling szGlobalAddAtom you return true all the time. You should check the return value. It could return an atom or 0 in case of an error so correct would be

    Code:
       Move (szGlobalAddAtom(sAtom)) to hAtom
       Function_Return (hAtom <> 0)
    well spotted. The dangers of uncritical cut and paste
    Thanks Mike
    I should be on a beach ...

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •