Showing results for 
Search instead for 
Do you mean 
Reply
Solved! Go to solution

"Failed to load image" error when open *.dll file

We have a tool programmed by C++ and works very well in NX9.

But after we upgrade our UG to NX10, when I try to open the *.dll file, I got "Failed to load image-see log file for details. File name: *.dll. Funtion name: ufuser." error. I attached a screen shot to show the message.

My operation was use "File/Execute/NX Open/*.dll".

Besides, the *.dll file has been signed use "SIGNDOTNET. EXE"

Have you ever see similar error? Do you know how to fix it?

Appreciat a lot for your help.

 

6 REPLIES
Solution
Solution
Accepted by topic author Yanping
‎06-16-2016 04:39 AM

Re: "Failed to load image" error when open *.dll file

Hello Yanping!

 

Did you update the nxopen-references?

When creating an application (e.g. *.dll) you have to set the references

(NXOpen.dll, NXOpen.Utilities.dll, ...) in the project.

 

Since the NXOpen-Interface grew a lot from NX9 to NX10 the old

sources won't work.

 

You should try to set the new references and recreate the *.dll file

(Don't worry, you won't have to change your code since all 'old'

method signatures stayed the same!).

 

Hope that helps!

 

Flo

Re: "Failed to load image" error when open *.dll file

You'll probably have to re-compile & re-link the DLL for NX10.

I believe it is recommended you start with a new (NX10) C++ NX template, then re-add your code.

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP5 + patch/TC11.2
I'd rather be e-steemed than e-diseaseled


Solution
Solution
Accepted by topic author Yanping
‎06-16-2016 04:39 AM

Re: "Failed to load image" error when open *.dll file

C++ applications need to be recompiled and relinked against the libraries delivered with every release using the specified compiler version for that release.

 

The NXOpen*.dll's mentioned as references in the first reply in this thread are only used by .Net (VB and C#). They are not used by C++, Java or Python.

 

If you are signing a C++ application, you should be using %UGII_BASE_DIR%\UGOPEN\signcpp.exe. (%UGII_BASE_DIR%\UGII\SignDotNet.exe is only for .Net applications, as it's name implies).

 

 

 

 

 

Re: "Failed to load image" error when open *.dll file

Hello JimB!

 

You are absolutely right, I somehow thought Yanping was using C#!

Thank you for the correction!

 

Bye,

 

Flo

Re: "Failed to load image" error when open *.dll file

Hi FlolScreen

 

The issue is resolved per your suggestions.

 

Thanks

 

Re: "Failed to load image" error when open *.dll file

Thanks, JimB.

The issue is resolved.