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,418 of 10,840   
   Antony Clements to Dean Earley   
   Re: a problem with copymem API   
   16 Feb 07 23:07:10   
   
   From: antony.clements@optusnet.com.au   
      
   stream1 is a pseudorandom string that can containing every character   
   available within the ansi standard with an undefined length. stream2 has a   
   defined length of 512 bits but can still contain any combination of   
   characters within the full ansi standard. that is characters with an ascii   
   code of 0 to 255. this means that var1 and var2 must hold a maximum number   
   of 255255255255. no data type that i know of will ever hold such a large   
   number except maybe a type def variable. but i wouldnt know where to begin   
   writing one to hold such a large number. i don't think converting from   
   unicode to ansi will have any positive effect on the rest of the code.   
      
   "Dean Earley"  wrote in message   
   news:45d5750b$0$32030$fa0fcedb@news.zen.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