05-15-2012 04:30 PM
Hi,
I've created a simple program using LabVIEW 8.5 that uses calls in winscard.dll to read and write to a Smart Card. I use Call Library Function Node to call functions in C:\Windows\System32\winscard.dll. This program works without a problem in Windows XP both within LabVIEW 8.5 and once it is compiled. I am also able to get this program to run without a problem when I run it in LabVIEW 2011 on a Windows 7 machine. However, when I run the program compiled with LabVIEW 8.5 on Windows 7, the first call I make to a function in the DLL returns Windows System Error 2 (file not found). Subsequent calls to other DLL functions return errors about invalid handles, which makes sense.
Can I compile the project in LabVIEW 2011 and save it back to a LabVIEW 8.5 compatible project file?
Thanks,
Jason Mazzotta
05-15-2012 04:42 PM
jazzdman wrote:
Can I compile the project in LabVIEW 2011 and save it back to a LabVIEW 8.5 compatible project file?
No you can't do that!
05-15-2012 04:56 PM
Well, I was able to compile it with 2011. That version actually runs in Windows 7. I was also able to save the project file back to an 8.5 compatible version. I was able to open that backwards-saved project file again in LabVIEW 8.5. However, the 2011 executable now pops up an error before it even starts
"Smart Card Util.exe - Entry Point Not Found
The procedure entry point _except_handler4_common could not be located in the dynamic link library msvcrt.dll"
Does anyone have any ideas how I can overcome this?
05-16-2012 01:26 AM - edited 05-16-2012 01:27 AM
There is something absolutely rotten in your project file. This function obviously is not located in msvcrt.dll but in one of the scard DLLs. Why that happens I have no idea but you might actually be refereing to the scard DLL in your Call Library Node by full path name instead of only the DLL name. This would cause the DLL to be included in the application build as a direct dependency and I'm pretty sure that you can't do that with a DLL like scard. The DLL that you use on your XP machines is most likely not the same as it should be on W7 and so if you copy it with your project then you get all kinds of very weird problems.
05-18-2012 08:28 AM
Calling winscard.dll without a path name did appear to fix both problems. _except_handler4_common does appear to be in msvcrt which is used by winscard.dll. Googling for _except_handler4_common seems to show that this error occurs often when mixing DLLs for different operationg systems. DLLs built for the newer Windows OS expect a newer version of the MS C RunTime (msvcrt).
08-16-2012 08:04 AM
Hi All,
I am also having the similar issue. I have a VI, developed in LV2010 on Windows XP machine with a dll call using "Call Library Function Node".
It is working fine in all WindowsXP machines but not in Window7 PCs.
Getting Error when i tried to open in Windows7 machine:
Error loading "DLL path....". Invalid access to memory location.
Please let me know how to make this working on both machines [XP and Win7].
Thanks,
Soumya
08-16-2012 03:09 PM
@bannu wrote:
Hi All,
I am also having the similar issue. I have a VI, developed in LV2010 on Windows XP machine with a dll call using "Call Library Function Node".
It is working fine in all WindowsXP machines but not in Window7 PCs.
Getting Error when i tried to open in Windows7 machine:
Error loading "DLL path....". Invalid access to memory location.
Please let me know how to make this working on both machines [XP and Win7].
Thanks,
Soumya
Way to little information to say anything useful about it. Attach your VI, explain what it should do, explain what the DLL is you try to call! You don't call your mechanicien saying your car doesn't start and expect him to diagnose the problem over the phone either with that much information.