sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Win32API or DL library usage?

    Scheduled Pinned Locked Moved Developers' Forum
    7 Posts 3 Posters 967 Views 3 Watching
    Loading More Posts
    • 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.
    • D Offline
      david.
      last edited by

      In the context of SU8, with Ruby 1.8.6, i386-mswin32:

      Has anyone got any tips on using the Win32API library? Or, since Win32API is deprecated, preferably the DL library?

      I get errors when trying to

      require 'dl'
      

      or

      require 'Win32API'
      

      .

      At a minimum, I presume I would have to have a local version of Ruby 1.8.6 installed to point to these libraries just to load them. Anyone have some references that shows how this might be loaded and usage examples? TIA.

      1 Reply Last reply Reply Quote 0
      • A Offline
        Anton_S
        last edited by

        Well you have to copy the win32API.so to plugins, or requre it by full path.

        1 Reply Last reply Reply Quote 0
        • D Offline
          david.
          last edited by

          I was able to get things working with Win32API.

          However, the DL library usage is so poorly documented that I couldn't get it working. The example given in http://forums.sketchucation.com/viewtopic.php?f=180&t=16574 by CPhillips seems incomplete.

          1 Reply Last reply Reply Quote 0
          • Dan RathbunD Offline
            Dan Rathbun
            last edited by

            @david. said:

            The example given in http://forums.sketchucation.com/viewtopic.php?f=180&t=16574 by CPhillips seems incomplete.

            He has an error in the example, which was noted further down the thread.

            You have to type the DLL functions as they are casewise (in C) in the extern call, but then the DL library creates a "Rubyish" method that has the first char downcased.

            I'm not here much anymore.

            1 Reply Last reply Reply Quote 0
            • D Offline
              david.
              last edited by

              OK, got DL working. I misunderstood the comment about case. Thanks!

              1 Reply Last reply Reply Quote 0
              • Dan RathbunD Offline
                Dan Rathbun
                last edited by

                @david. said:

                However, the DL library usage is so poorly documented that I couldn't get it working.

                The doc for DL is located in the source package, at:

                ruby-1.8.6-p287\ext\dl\doc\dl.txt

                Here's a copy so you need not download the whole source package:
                dl.txt
                Online version at ruby-doc.org

                I'm not here much anymore.

                1 Reply Last reply Reply Quote 0
                • Dan RathbunD Offline
                  Dan Rathbun
                  last edited by

                  • Ruby (v1.8.6-p287) Windows One-Click Installer (offsite)

                  • Helper script: Ruby LOAD PATHs script (Win32) : ver 3.0.1

                  • Topic: Win32API vs DL lib

                  • Files: Win32API and Win32OLE so files

                  I'm not here much anymore.

                  1 Reply Last reply Reply Quote 0
                  • 1 / 1
                  • First post
                    Last post
                  Buy SketchPlus
                  Buy SUbD
                  Buy WrapR
                  Buy eBook
                  Buy Modelur
                  Buy Vertex Tools
                  Buy SketchCuisine
                  Buy FormFonts

                  Advertisement