Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. COM
  4. ActiveX & unicode

ActiveX & unicode

Scheduled Pinned Locked Moved COM
comquestion
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Paolo Vernazza
    wrote on last edited by
    #1

    I wrote an activex control that works well in W98. It had some problems with extended chars in WinwowsXP, so I recompiled it using unicode support. And now it works well in WinXP. But I can't register it win w98 nor in wme. Have I got to distribuite 2 versions (98/me and 2000/xp) or there is some way to have only one activeX working on both systems? Thanks Paolo

    S F 2 Replies Last reply
    0
    • P Paolo Vernazza

      I wrote an activex control that works well in W98. It had some problems with extended chars in WinwowsXP, so I recompiled it using unicode support. And now it works well in WinXP. But I can't register it win w98 nor in wme. Have I got to distribuite 2 versions (98/me and 2000/xp) or there is some way to have only one activeX working on both systems? Thanks Paolo

      S Offline
      S Offline
      Steve S
      wrote on last edited by
      #2

      Not being able to register sounds like it cannot be loaded. Chances are that you're using API calls which have UNICODE/ANSI versions, eg OpenFileA and OpenFileW. In the UNICODE build, it will be trying to pull in references from the DLLs like KERNEL32, USER32 etc. The XP versions have both ANSI and UNICODE entry points, but the Win9x versions don't, they only have ANSI. This gives an error when loading the DLL. To resolve it, you can (a) have two builds (as you ask) (b) Build only an ANSI version, but convert all string parameters (in and out) and properties to be BSTR, which are UNICODE strings. This will require a little extra effort, as you may well need to convert from UNICODE to ANSI for use internally, but it's probably worth it. Steve S Developer for hire

      P 1 Reply Last reply
      0
      • S Steve S

        Not being able to register sounds like it cannot be loaded. Chances are that you're using API calls which have UNICODE/ANSI versions, eg OpenFileA and OpenFileW. In the UNICODE build, it will be trying to pull in references from the DLLs like KERNEL32, USER32 etc. The XP versions have both ANSI and UNICODE entry points, but the Win9x versions don't, they only have ANSI. This gives an error when loading the DLL. To resolve it, you can (a) have two builds (as you ask) (b) Build only an ANSI version, but convert all string parameters (in and out) and properties to be BSTR, which are UNICODE strings. This will require a little extra effort, as you may well need to convert from UNICODE to ANSI for use internally, but it's probably worth it. Steve S Developer for hire

        P Offline
        P Offline
        Paolo Vernazza
        wrote on last edited by
        #3

        [quote]Not being able to register sounds like it cannot be loaded.[/quote] It crashes and then reports the error "LoadLibrary failed". Yes, I'm using socket API with different unicode/ansi version. At first I had only the ansi version, but it gave me some problems with ext chars; also I don't know where to convert from unicode to ANSI, because the VC++ Wizard declares the called function using "LPCTSTR"...

        1 Reply Last reply
        0
        • P Paolo Vernazza

          I wrote an activex control that works well in W98. It had some problems with extended chars in WinwowsXP, so I recompiled it using unicode support. And now it works well in WinXP. But I can't register it win w98 nor in wme. Have I got to distribuite 2 versions (98/me and 2000/xp) or there is some way to have only one activeX working on both systems? Thanks Paolo

          F Offline
          F Offline
          f64
          wrote on last edited by
          #4

          Hi Well one option is, as you said, having two versions, the other one is using the Microsoft Layer for Unicode on Windows 95/98/Me Systems Fabian

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups