Question

I need to read\write tga files from vb, I found TargaImage.dll, nice lib but it allows only read tga. I found FreeImage, tryed to import it in vb, but it says:

FreeImage.dll could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component.

I think I have to use , but absolutly dont know anything. help plz:)

Was it helpful?

Solution

From looking at the way the distribution works, you have two options:

First, you could call the functions in the DLL directly using <DllImport> attributes. This is going to require a lot of learning of how to make calls to unmanaged DLLs, passing the right values, etc. Which is why I suggest the second option.

The second option is, you can use the .NET Wrapper project that is included in the distribution. If you're using a version of Visual Studio that supports multiple programming languages, just add the wrapper project to your solution and reference the wrapper project from the project that needs to use it.

If you're using Visual Studio Express, you won't be able to add a C# project to a VB solution. I'd suggest downloading C# Express, compiling the wrapper project, and then adding the compiled DLL to your VB.Net project.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top