|Anyone out there have the expertise to conver below code from C# to VB.Net, I'm using VS 2005. It's from another thread; here are the details:|
I'm able to convert most of it but MyProject called "LogCodes" does not have a ".Properties" and my DLL is called: "Interop.EXTRA.dll"
This is for C# in VS2005.
Step 1) add the dll as a resource. To do this open the project, select the resources tab, select "add existing file" and add the DLL as a resource.
Step 2) Add the name of the DLL as a string resource.
Step 3) Add this code to your main form-load: (In this example my project is called "USBXpress_TestPanel", and the DLL file I'm using is "SiUSBXp.dll").
if (System.IO.File.Exists(USBXpress_TestPanel.Properties.Resources.DLLName + ".DLL") == false)
// Create the DLL file
OutStream = new System.IO.StreamWriter(USBXpress_TestPanel.Properties.Resources.DLLName + ".DLL", false);
BinStream = new System.IO.BinaryWriter(OutStream.BaseStream);