LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Modified a DLL created in labview and now getting labview.lib was not called from a labview process error

Watcom was the only C compiler supported to create CINs back in those old days. It was the only compiler that could create the 32 bit code resources that LabVIEW needed, as it was itself compiled as a full 32 bit application even when running for 16 bit Windows 3.1. A CIN back then was a Watcom REX object file embedded in the VI.

 

When they moved to support Windows 95 they used Visual C to create LabVIEW and changed the CIN code to be a DLL with specific exports as well as the new module load mechanisme. They did retain the ability to load 32 bit REX CINs even in Windows 32 bit versions of LabVIEW as a backwards compatibility option and except the special locating of the object start header nothing to complicated needed to be changed as both architectures used the 32 bit flat memory model.

 

So the REX CIN doesn't even know about Windows 32 bit DLLs. It could access 16 bit Windows DLLs with a very complicated thunking mechanisme that required fairly involved Watcom C specific function calls and then was directly turned into special assembly code to prepare the 16 bit stack, switch the CPU into 16 bit segment:offset protected mode addressing, jump to the DLL function and on return unwind the complete 16 bit stack, copying any parameters that the C programmer had indicated to be return values back into the 32 bit address space and finally switch the CPU back into 32 bit address mode.

 

But I'm pretty sure that 16 bit mode was most likely not functional under NT versions of the Windows kernel anymore.

Rolf Kalbermatter
My Blog
0 Kudos
Message 21 of 21
(153 Views)