I have written a COM control in c# .Net 4.5, this COM control uses a 3rd party dll to communicate with a USB device.
On Windows 7 32bit everything works 100% from both VBScript and the VB6 app. On Windows 7 64bit the VBScript fails when calling the 3rd party dll function that uses the USB device.
The exception is: "System.AccessViolationException" with message: "Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
What I don't understand is that the same COM control (and the same USB driver) works when instantiated from the VB6 app, but not from the VBScript.
I have looked at the loaded assemblies and registry access using Process Monitor when running the VB6 app and the VBScript but I cannot see anything out of the ordinary.
Any suggestions of what I can troubleshoot or test next?
"c:\windows\syswow64\cscript.exe" myScript.vbs
- MC ND