Label Printing Fails after creating build

This should work in 32 and 64:

Dim job As Integer

Dim mb As New MemoryBlock(COM.SIZEOF_PTR * 3)
Dim mb1 As MemoryBlock
Dim mb2 As MemoryBlock
Dim mb3 As MemoryBlock
mb1 = New MemoryBlock(jobname.len + 1)
mb2 = New MemoryBlock(1)
mb3 = New MemoryBlock(4)

mb1.CString(0) = jobname
mb2.CString(0) = ""
mb3.CString(0) = "RAW"
mb.Ptr(COM.SIZEOF_PTR * 0) = mb1
mb.Ptr(COM.SIZEOF_PTR * 1) = mb2
mb.Ptr(COM.SIZEOF_PTR * 2) = mb3

Declare Function StartDocPrinterA Lib "winspool.drv" (phandle As Integer, level As Integer, _
d As Ptr) As Integer

job = StartDocPrinterA(handle, 1, mb)