Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to load DLL 'visa32.dll': The specifiedmodulecould not be found

Solved!
Go to solution

HI:

I encountered a problem while writing winform code using C #.    Unable to load DLL 'visa32.dll': The specifiedmodulecould not be found. (Exception from HRESULT: 0x8007007E)

1,Not all computers have this problem. Currently, it seems that only the Win10 64bits Home Edition will have this issue.

2,There is no problem with other software calls to this DLL. For example, IOlibraries, Python.

3,According to the online instructions, register this DLL, regsvr32 visa32.dll, and it will display "The DLL has been loaded, but the entry point cannot be found".

4,According to online reports, I have tried running as an administrator or something like that. Unable to register.

5,By changing the solution platform to X64, it can now run.But by doing so, I won't be able to reference other 32-bit DLLs.

6,But why does a "Windows 10 64bits home version" computer require an X64? Can't either 'anycpu' or 'X86' work? And why don't other 64 bit computers have this problem, only occasionally with this home version?


How to solve this problem?
code
public static extern int viOpenDefaultRM(out int sesn);
[DllImportAttribute("VISA32.DLL", EntryPoint = "#128", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)]


0 Kudos
Message 1 of 2
(1,411 Views)
Solution
Accepted by topic author xiaochouyu

Resolved, reinstall IO libraries. And check "the keysight VISA as primary VISA".

 

0 Kudos
Message 2 of 2
(1,399 Views)