home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.visual.basic      MS Visual Basic discussions, NOT dot-net      10,840 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 10,416 of 10,840   
   Dean Earley to Antony Clements   
   Re: a problem with copymem API   
   16 Feb 07 09:08:36   
   
   From: dean.earley@icode.co.uk   
      
   Antony Clements wrote:   
   > if stream1 has a value of 1a2b3c4d i want bytearray() to return the asc   
   > value of the string. the only way i know how to do this is take each   
   > character convert to ascii and then place in a string and then place the   
   > string in bytearray().   
      
   As I said...   
      
    > If you want each character as an item in the array, then you want:   
    > bytearray = StrConv(string, vbFromUnicode)   
      
    From a string of "1a2b3c4d", this will give you an 8 item array   
   containing: 49, 97, 50, 98, 51, 99, 52, 100,   
      
   IF however, you want the 32bit equivalent of that hex encoded string (if   
   it is hex) then you will need to manually split it on every two   
   characters and pass it through val("&H" & hexvalue) and store each part   
   in the array.   
      
   --   
   Dean Earley (dean.earley@icode.co.uk)   
   i-Catcher Development Team   
      
   iCode Systems   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca