c# - COM function fails on VBscript but not VB6 on Win64 -


i have written com control in c# .net 4.5, com control uses 3rd party dll communicate usb device.

on windows 7 32bit works 100% both vbscript , vb6 app. on windows 7 64bit vbscript fails when calling 3rd party dll function uses usb device.

the exception is: "system.accessviolationexception" message: "attempted read or write protected memory. indication other memory corrupt."

what don't understand same com control (and same usb driver) works when instantiated vb6 app, not vbscript.

i have looked @ loaded assemblies , registry access using process monitor when running vb6 app , vbscript cannot see out of ordinary.

any suggestions of can troubleshoot or test next?

here's deal. applications written vb6 32-bit. application works on 32-bit windows , vb6 app on windows 64 (which running 32-bit, since vb6 produces 32-bits. so, know dll works 32-bit applications.

the thing is, when run vb script on windows 64, runs 64-bit process , have mismatch 32-bit dll. if run vb script 32-bit version of vb script engine (c:\windows\syswow64\wscript.exe or c:\windows\syswow64\cscript.exe) work? will.

now, if compiled dll anycpu processor setting, can still register dll , work 64-bit process. sure use regasm.exe in 64-bit hive.

for example register dll such,

c:\windows\microsoft.net\framework64\v4.0.30319\regasm.exe /tlb /codebase c:\path\to\yourdll.dll 

Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -