bdinnocenzo
Active member
Hi all,
This is my first post so if I've posted to the wrong area I apologize. I've searched this site and the web for help in this area and so far have come up empty. I'm new to VB.NET, been programming (as a hobby most recently) for about 10 years. Most of my recent work has been in VB6. I am in the process of re-writing an application I did in VB6 that, among other stuff, accepts credit cards using a card reader plugged into a USB port. In VB6 this was handled through an ActiveX control, but in VB.NET I was was lead to using Microsoft's POS for .NET V1.12 by the card reader manufacturer.
I've installed all of the POS for .NET software and ran a test application from the vendor (MagTek) and all seems to work fine with one of their readers. The test app is written in C#.
I'm trying to incorporate the mag card reader into the VB.NET application and do not know C# enough to understand the code.
When I try to open and access the reader I get an error stating "The value of the 'DevicePath' property must be defined by the service object before Open() can be called."
Here is the quick snipet of what I'm doing. It's just a few lines in a form's load routine...
I can't seem to find the point at which I would define the 'Device Path'.
Thanks in advance for any help.
-Bill
This is my first post so if I've posted to the wrong area I apologize. I've searched this site and the web for help in this area and so far have come up empty. I'm new to VB.NET, been programming (as a hobby most recently) for about 10 years. Most of my recent work has been in VB6. I am in the process of re-writing an application I did in VB6 that, among other stuff, accepts credit cards using a card reader plugged into a USB port. In VB6 this was handled through an ActiveX control, but in VB.NET I was was lead to using Microsoft's POS for .NET V1.12 by the card reader manufacturer.
I've installed all of the POS for .NET software and ran a test application from the vendor (MagTek) and all seems to work fine with one of their readers. The test app is written in C#.
I'm trying to incorporate the mag card reader into the VB.NET application and do not know C# enough to understand the code.
When I try to open and access the reader I get an error stating "The value of the 'DevicePath' property must be defined by the service object before Open() can be called."
Here is the quick snipet of what I'm doing. It's just a few lines in a form's load routine...
VB.NET:
Imports Microsoft.PointOfService
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim mtcr As New MagTekServiceObject.MagTekMsr
mtcr.Open() ' This is where I get the error...
End Sub
End Class
I can't seem to find the point at which I would define the 'Device Path'.
Thanks in advance for any help.
-Bill