Error 126 in LoadLibrary('MatrixOp.dll')
Submitted by adyzw on Mon, 09/17/2012 - 01:38
I have recently installed VisSim V80 trial version and i keep getting 'Error 126 in Loadlibrary(MatrixOp.dll)', while trying to load an example dll from 'C:\VisSim80\Vsdk\EXAMPLES\MatrixOp\Debug\MatrixOp.dll' using UserFunction block.
any help please?
Answers
-
Submitted by Anders89 on Mon, 09/17/2012 - 20:25.
The VSDK (VisSim Software Development Kit) examples show how to write your own VisSim blocks using C/C++ to create a DLL.
There are 2 issues here:
Issue 1) The MatrixOp project was built with settings > General > 'Use MFC in a Shared DLL'. This requires that you have MFC42D.dll and MSVCRTD.dll on your computer. You can copy MFC42D.dll and MSVCRTD.dll to \Windows on your computer (or \windows\sysWOW64 for Win 64), or you can rebuild the project with the setting 'Use MFC in a Static Library'.Issue 2) In order for your block(s) in the DLL to show up on the VisSim menu, you must tell VisSim the path to your DLL like so:
- Select Edit > Preferences... > Addons
- Scroll to the bottom of the list and double click the '...'
- Navigate to 'C:\VisSim80\Vsdk\EXAMPLES\MatrixOp\Debug' and select MatrixOp.dll, click OK
- Restart VisSim and the block will appear on the menu and test files will load fine
0 -
Submitted by adyzw on Tue, 09/18/2012 - 15:15.
This helped me. Thanks Anders89!
0