Sample code for VB.net to print to zt230 via usb

Do you have an updated version of the sample code on the link:

https://support.zebra.com/cpws/docs/zpl/zpl_elp_vbnet.htm

The following lines of code no longer work. The FileStream now needs a SaveFileHandle instead of

a the file handle created by the CreateFile (this is what is reported by VS2008.)

hPort = CreateFile(LPTPORT, GENERIC_WRITE, FILE_SHARE_WRITE, SA, OPEN_EXISTING, 0, 0)

hPortP = New IntPtr(hPort) 'convert Integer to IntPtr

outFile = New FileStream(hPortP, FileAccess.Write, False) 'Create FileStream using Handle

I can not figure out how to correct the sample code in the link but it is exactly what I need to do. I need to write

the ZPL directly to the printer. We have a ZT230/USB and it is installed and working with ZebraDesigner. I just

need to learn how to send the ZPL from my VB.Net app. I would imagine this is a very common requirement, so any samples would

be greatly appreciated. I need to also mention that I must work in .Net version 2-3 due to other limitations in the application.

Thanks,

John