Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

error in registering a COM Dll

sbenati
Beginner
385 Views
Hallo,
I'm new with Visual Fortran Compiler. I'm trying to develop a COM dll using the Fortran COM Server Wizard. I follow the tutorial for creating the Adder object.The development and the building of the dllseems to work very well, but when I try to register the component with the regsrv32, it returns an error message: "LoadLibrary failed, GetLastError returns 0x00000485". On the other end the dll built from the Calculator Sample installed along with the compiler can be registered without problems. The set of files of the two projects seem to contain the same functions forregistering the dll. Is there a project setting that I have to change? Or what else? Can someone help me?
0 Kudos
2 Replies
Jugoslav_Dujic
Valued Contributor II
385 Views
For what is worth, 0x485 = 1157 = "One of the library files needed to run this application cannot be found." That sort of implies that your dll cannot be loaded because one of dll's it depends on is not present.
Try the following test program and execute it in the same directory as your dll:
program dlltest
use dfwin
if (LoadLibrary("YourDll.dll"C) == 0) then
  write(*,"(a,Z8.8)") "Error: ", GetLastError()
else
  write(*,*) "Success"
end if
end program
If you reproduce the error, run "Dependency walker" from CVF program group and
see on which dlls is yours dependent -- that might give you a clue.
Jugoslav
0 Kudos
sbenati
Beginner
385 Views

Thank Yugoslav! After some truoble and help from my friends, I discovered that I had to add the option:

odbglibs

in Settings>Fortran>Generals>Project Options

Apparently now everything works...but tomorrow never knows!

0 Kudos
Reply