Hello all!
I have an existing VB.NET project, using VS-2008. The project is ever evolving, and I've decided to integrated a light beacon by DELCOM PRODUCTS.
They provide a library of code, but it's in C#. They are telling me that VS supports combining the two, and that I can integrate their function library by following their steps below.
I've done steps 1-3.
But the "Private Delcom As DelcomHID" declaration doesn't work, no matter where I put it. I don't have any experience doing this sort of thing, so I'm hoping I can get some help here.
In step 2, when I add the C files to the project, they are added as "content" by default. I've tried changing that to "compile", which makes it not error on the Private Delcom declaration, but it won't compile/run. Many errors.
Am I missing a key element?
Here is the beginning of their form1.c file that would apparently work if I were using C. Maybe this will help someone recognize what I'm missing in the vb.net end.
-------
// Delcom C# USB HID Visual Indicator Example
// Dec 16, 2008
// This code show how to control the Delcom USB HID Device.
// Steps to make this project.
// 1 Create your project
// 2 Copy the follow file in the project source directory
// DelcomHID.cs, DeviceManagement.cs, DeviceManademenedDeclarations.cs
// FileIODeclarations.cs, Hid.cs, HidDeclarations.cs
// 3 Add the above file to your project. Use add existing in Solution Explorer
// 4 Add the following inside your namespace:
// DelcomHID Delcom = new DelcomHID(); // declare the Delcom class
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using HIDIOWINCS;
namespace HIDVIWINCS
{
public partial class MainForm : Form
{
private DelcomHID Delcom = new DelcomHID(); // declare the Delcom class
private DelcomHID.HidTxPacketStruct TxCmd;
Byte LED_GREEN_PIN, LED_RED_PIN, LED_BLUE_PIN;
....cut off here
Any help would be greatly appreciated.
Jeff
I have an existing VB.NET project, using VS-2008. The project is ever evolving, and I've decided to integrated a light beacon by DELCOM PRODUCTS.
They provide a library of code, but it's in C#. They are telling me that VS supports combining the two, and that I can integrate their function library by following their steps below.
- Create your vb.net project.
- From the USBVIWINCS example copy the following files to you working directory.
- DelcomHID.cs, DeviceManagement.cs, DeviceManademenedDeclarations.cs, FileIODeclarations.cs, Hid.cs, HidDeclarations.cs
- Add the above files to your project. Use add existing option in Solution Explorer.
- Add ?Private Delcom As DelcomHID? in your code.
- Then call the functions. Delcom.Open(), Delcom.SendCommand(), Delcom.Close()
I've done steps 1-3.
But the "Private Delcom As DelcomHID" declaration doesn't work, no matter where I put it. I don't have any experience doing this sort of thing, so I'm hoping I can get some help here.
In step 2, when I add the C files to the project, they are added as "content" by default. I've tried changing that to "compile", which makes it not error on the Private Delcom declaration, but it won't compile/run. Many errors.
Am I missing a key element?
Here is the beginning of their form1.c file that would apparently work if I were using C. Maybe this will help someone recognize what I'm missing in the vb.net end.
-------
// Delcom C# USB HID Visual Indicator Example
// Dec 16, 2008
// This code show how to control the Delcom USB HID Device.
// Steps to make this project.
// 1 Create your project
// 2 Copy the follow file in the project source directory
// DelcomHID.cs, DeviceManagement.cs, DeviceManademenedDeclarations.cs
// FileIODeclarations.cs, Hid.cs, HidDeclarations.cs
// 3 Add the above file to your project. Use add existing in Solution Explorer
// 4 Add the following inside your namespace:
// DelcomHID Delcom = new DelcomHID(); // declare the Delcom class
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using HIDIOWINCS;
namespace HIDVIWINCS
{
public partial class MainForm : Form
{
private DelcomHID Delcom = new DelcomHID(); // declare the Delcom class
private DelcomHID.HidTxPacketStruct TxCmd;
Byte LED_GREEN_PIN, LED_RED_PIN, LED_BLUE_PIN;
....cut off here
Any help would be greatly appreciated.
Jeff
Last edited: