imports java.util.zip in a vb.net project - vb.net

I need to import java.util.zip for my project to zip and unzip chosen files/folders in vb.net. But when i say imports java.util.zip, i get the error "Namespace cannot be found". I went in the add reference and checked in both .net and COM components bout found nothing for java.
What dll would i need to make this work?
thanks

If you need zip/unzip using a pure managed code library, you should to take a look at SharpZipLib

You might be talking about some ancient J# library, in which case you'll have to reference vjslib.dll
Don't do that though.
Use a sane,small Zip library, such as DotNetZip

Related

Why I can't use Shell method in VB.NET?

I see everyone is using the Shell command without any problem, but it doesn't work for me, it says it's not declared like it doesn't exist. I'm working in Visual Studio using VB.NET.
Interaction.Shell is in the Microsoft.VisualBasic namespace, which should automatically be imported for Visual Basic projects.
If it isn't in yours, you can fix that in the project properties (Tab "References") or manually add Imports Microsoft.VisualBasic at the top of the code file.
Another possible reason is that Interaction.Shell is not included in .NET Core versions prior to 5. In that case, use a "classic" .NET Framework project or .NET 5 or higher instead. (Credit to Hans Passant in the comments.)
I have recreated the app, without change anything and now it works... In any case, thank you to everybody for the support.

I made a project in C++ CLI, But I can decompile it using a C# Decompiler

Is there any way, I can prevent my c++ cli project from being decompiled if someone uses a C# decompiler, because I tried to decompile the .exe i made in ILSpy and it showed my whole code, so is there any way I can prevent this?
Thanks
as ancient as this thread is, I ran across it with the same question, and a newish answer. Can't specify the minimum version for this one, but
[module:System::Runtime::CompilerServices::SuppressIldasmAttribute];
on top of each .cpp module did the trick for me:
I didn't investigate much further, yet.
Another useful thing is to add
#pragma unmanaged
to each .cpp that does not contain .net code.
You can
Use a .NET obfuscator.
Or
Only use C++CLI for the boundaries of your app which require to Interact with .NET. And implement your logic in a native C++ library.

NReco.PdfGenerator.HtmlToPdfConverter' is not defined

Hi this may sound like a dumb question, but I am trying to use the NReco PDF library in my VB.NET Win Form application, and I am getting this error when I try to compile my code:
NReco.PdfGenerator.HtmlToPdfConverter' is not defined
I added the reference to the DLL and when I first wrote this code:
Dim converter As New NReco.PdfGenerator.HtmlToPdfConverter
It recognized the NReco namespace and everything seemed fine, but whenever I try to compile it acts like the DLL is missing. I know this library is written in C# but the site just said it was a .NET library, and I have used other libraries written in C# with no problem.
Any ideas on why this isn't working?
I never could figure out why NReco wasn't working, but I did find a pretty awesome alternative that works very well.
Nuget Package: https://www.nuget.org/packages/Pechkin/
Source Code: https://github.com/gmanny/Pechkin
This library uses WebKit Engine to convert HTML to PDF and it does a very nice job of rendering things correctly thanks to WebKit.
It is relatively easy to use and it is free to use under the creative commons license. I highly recommend this library for anybody wanting this functionality for free.

vb.net: is it possible to import FreeImage.dll to vb.net?

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:)
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.

Add the DLL (lame_enc.dll) reference to my project

I need to convert all types of audio formats to the mp3.
I think I need to add the refrence of the dll (lame_enc.dll) into my .net application.
When I try to add the DLL reference to my project, I get an error: "A reference to C:\Lame_Enc.dll could not be added. Please make sure this file is accessible and that it is a valid assembly or COM component"
Is there any other solution that I can convert all types of audio formats to the mp3 and also I need to convert all types of video formats to the flv.
Many thanks for your consideration.
Why reinvent the wheel? Here
http://www.codeproject.com/KB/audio-video/MP3Compressor.aspx
you find a .NET wrapper library for lame_enc.dll. It is written in C#, but usage from VB.NET should be no problem.
By the way, if you want to use native DLLs (no COM, no .NET) from a VB.NET program, you don't have to add a reference to that DLL, you just have to copy that DLL into your working directory of your VB.NET program and use PInvoke. Read this tutorial (C# only, sorry)
http://msdn.microsoft.com/en-us/library/aa288468%28v=vs.71%29.aspx
to learn more about it.