This project is read-only.

Swap to IBM free version of spssio*.dll



I just recompiled the sources against the free IBM spssio dll's (location in discussions) and saw little differences (I will post some additional code once i've completed the comparisment between the vb file that comes with IBM dll's.

Best of all, both 32 and 64 bits dll now export all functions without @ suffix (so it should be easy to support both with mininal changes). The 32 bits dll also exports the old decorated functions.

I already added some code that emulates two missing SPSS macro's that are mentioned frequently in the sources.
    public static Int32 SPSS_STRING(Int32 size)
        return size;

    public const Int32 SPSS_NUMERIC = 0;
Anyway thanks for writing this wrapper (saves a lot of time)!


file attachments


AArnott wrote Mar 23, 2012 at 5:55 PM

Awesome! Can you fork this project, commit your changes and send a pull request?

wvd_vegt wrote Apr 2, 2012 at 9:45 PM


I finally managed to get things working against the ibm dll's AND dynamically load either the

wvd_vegt wrote Apr 2, 2012 at 10:13 PM


It took me some time to revist the project and find a method i liked to on-demand load the 32 or 64 bits dlls.

As I'm not good at the DCVS things like forking (i tend to screw-up these systems) I've attached my new SpssThin/SafeWrapper and leave it up to you to examine and integrate it.

The only problems I encountered where the signature of spssGetVarLabel (had to change the last parameter from out -> ref) and I did not find a suitable spot to unload the spss dll's. For loading i used a static constructor inside SpssThinWrapper. Finally in SpssSafeWrapper I had to prefix all calls to SpssThinWrapper with the SpssThinWrapper classname.

The new SpssThinWrapper expects a x86 and x64 subdirectory below the programs directory with the appropriate IBM dlls (spssio*.dll and ico*.dll) in it. The compile type of both spss assembly and project can then be set to anycpu!

Without IBM dll's (ie the old 32 bits ones) it will not work as for those the method signatures differ between 32 and 64 bit (something the ibm ones fix by having double exports in the 32 bits dll, with and without a @ adornment).


hribek25 wrote May 3, 2012 at 10:56 AM

Hi wvd_vegt,
I tried your version of dynamic DLL loader and it works pretty fine! I also tried to implement Unicode support but still can't get thru. Would you mind contacting me in order to discuss it? You may be able to find a way...

Many thanks,

swinstanley wrote Aug 15, 2012 at 6:32 AM

Hi I've just looked through these changes from the earlier zip file and they look excellent from the point of view of deploying code to mixed platforms.

What is the status of this change? I see a Fork on the project but it doesn't seem to be integrated at the moment.

swinstanley wrote Aug 15, 2012 at 11:49 AM

I have submitted a pull request for my fork swinstanley/spssio3264 on this issue. In my development environment this fork works correctly in both 64 and 32 bit processes based very much on the code wvd_vegt attached to this issue with minor modifications.

The binaries currently in the fork are the latest at the time of writing (v20) IO dlls.

Please feel free to contact me if you would like a binary package to test prior to this (hopefully) being pulled into the main source tree.