Byte array in VBA Access -
how pass byte array function parameter in vba?
in vb function writing epc hex word rfid tag:
public shared function writeepc_g2(byref conaddr byte, **byval password() byte**, **byval writeepc() byte**, byval writeepclen byte, byref errorcode integer, byval porthandle ineger) integer
bolded parameters made function generate byte array textboxes (password "00000000" , ecp write "i.e. 1234")
private function hexstringtobytearray(byval s string) byte() s = s.replace(" ", "") dim buffer(s.length / 2 - 1) byte dim integer = 0 s.length - 2 step 2 buffer(i / 2) = convert.tobyte(s.substring(i, 2), 16) next return buffer end function
vba has built-in function this:
buffer = strconv(string, vbfromunicode)
Comments
Post a Comment