Problems with using custom dll

Problems with using custom dll

I am running Visual Studio 2005 and I am having problems using custom dll, which contains some IPP Fourier transform functions. I am using the following code in C#:

internal const string lib = @"ippfouriertransform.dll";
...
[DllImport(lib)]
public static extern
IppStatus ippsDFTInitAlloc_R_32f(IppsDFTSpec_R_32f** pDFTSpec,
int length, int flag, IppHintAlgorithm hint);
...
But if I try to use this function in my application, for example in such a way 
...
IppStatus st; IppsDFTSpec_R_32f* spec;
st = SpectrumIpps.ippsDFTInitAlloc_R_32f(&spec,
System.Convert.ToInt32(pSrc.Length), 1,
IppHintAlgorithm.ippAlgHintNone);
...
I always get the fatal error :
System.DllNotFoundException: Unable to load DLL 'ippfouriertransform.dll': Indicated modulus not found (Exception from HRESULT: 0x8007007E)
at NeuroSoft.Math.Spectrum.SpectrumIpps.ippsDFTInitAlloc_R_32f(IppsDFTSpec_R_32f** pDFTSpec, Int32 length, Int32 flag, IppHintAlgorithm hint)
I created custom dll with the help of files, attached in that (http://softwareforums.intel.com/en-us/forums//topic/50289) topic .
I've attached my custom dll. Help me please.
thanks,    Anton
7 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

my dll

Attachments: 

AttachmentSize
Download ippfouriertransform.rar95.82 KB

Hello, you can check your DLL with depends.exe tools from MSVC package (it shows dependancies for your DLL). BTW, did you try to load this DLL from C/C++ program?

Regards,
Vladimir

Greetings!
I have checked up my DLL with depends.exe tools from MSVC package and have found out one error and one warning in it. The error consist in absence of a DLL msvcr80.dll. I have copied msvcr80.dll in a directory of my DLL and the error has disappeared.
The warning consists in the following:

"At least one module has an unresolved import due to a missing export function in a delay-load dependent module."

Except for that i see red icon near the

"c:windowssystem32MPR.DLL"

(this DLL exists in c:windowssystem32 ) and near the "WNetRestoreConnectionA" function of MPR.DLL.
I need to load my DLL from C# program.
What should i do with this warning?

thanks,
Anton

Well, to be honest,I did not face problem like that (I'll inform our expert of course, they might have additional comments to that). What I can suggest you:

1. to check if you can use this DLL in regular C++ program, just to ensure that there is no any hidden issues with build of it

2. to try to load original IPP DLL, to ensure that youdo it correctly (I can recommend you to take a look on IPP C# sample, which demonstrates how to use IPP functions in C# program)

Regards,
Vladimir

Hello,
I have noticed one strange thing - when I declare a variable "lib" as
internal const string lib = "ippfouriertransform.dll";
I receive an error with DllNotFoundException (at attempt of start of the application), but if i declare
a variable "lib" as
internal const string lib = @"E:...ippfouriertransform.dll"; (with the full path to my dll)
I receive a message : (twice)

Microsoft Visual C++ Runtime Library

Runtime Error!

Program: E:CSharpPrograms|Neur ...

R6034
An application has made an attempt to load the C runtime library incorrectly.
Please contact the application's support team for more information.

and only after that a recieve an error with DllNotFoundException.

But if I load original IPP dll (ipps.dll) my application works perfectly.
I tried to load my dll from Delphy / C++ applications but recieved the same message. I shall hope that expert canhelp me with the decision of the given problem.

Hi Anton,

while our experts are looking on that, I would like to inform you that we just released the next version of IPP, which is 5.1.1.It is update for IPP 5.1 and is targeted to cover the latest Intel micro-architecture innovations, Intel Core 2 Duo.

Regards,
Vladimir

Login to leave a comment.