Creating a Standalone Application with Pcap.net

Dec 14, 2014 at 9:42 PM
Hi,

Firstly, I would like to thank the developers of Pcap.net for being such an awesome project.
I have a little problem, i am creating an application with all the dll's as embedded resource in VB.NET(Need a Standalone app)

i am able to easily manage all the 3 dll files expect PcapDotNet.Core.dll as this comes as an unmanaged DLL.

I found few threads on the internet which asked me to export the dll to the disk and the returning its path..
Dim path As String = My.Computer.FileSystem.SpecialDirectories.Temp + "\" + "PcapDotNet.Core.dll"
Dim stream As System.IO.Stream = System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("HTMLHeaderProject.PcapDotNet.Core.dll")
Dim raw(stream.Length) As Byte
stream.Read(raw, 0, stream.Length)
System.IO.File.WriteAllBytes(path, raw)
Return System.Reflection.Assembly.LoadFile(path)
I Have added dlls as references and have set it 'copy local' to false
and i have added dlls as resources

Please do check if the path (HTMLHeaderProject.PcapDotNet.Core.dll) is correct for the files kept in resource folder? here HTMLHeaderProject is the name of my project

Please Help
Coordinator
Dec 20, 2014 at 10:56 AM
Hi predator786,

I don't know much about embedding dlls.
Can you explain why do you need to embed the dlls (why can't a standalone app have more dlls)?
What is the issue you're seeing with your changes?

Boaz.