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,424 of 10,840   
   J French to antony.clements@optusnet.com.au   
   Re: a problem with copymem API   
   17 Feb 07 11:24:28   
   
   From: erewhon@nowhere.uk   
      
   On Sat, 17 Feb 2007 21:42:28 +1100, "Antony Clements"   
    wrote:   
      
   >you would be correct mr French. i have tried everything i know before i came   
   >to ask for help, including everything that mr earley suggested, they all   
   >work some occasions and throw up overflow errors on other occasions.   
   >   
   >what i really need is work around so that no error occurs at all. the only   
   >way to do this is to only take three characters at a time and this is not   
   >acceptable in the long term. using CopyMemory in the way you just suggested   
   >as it will throw up an error unless the long is unsigned. i know there is a   
   >way in which to allow for an unsigned variable, but i'm not sure how this is   
   >achieved.   
      
   I've been using CopyMemory for years with any old data, what happens   
   is the 'string' is converted to four ANSI characters and then shoved   
   into the Long.  The sign does not matter a jot.   
      
   As I mentioned earlier this is dangerous in MBCS Locales as 8 bytes of   
   Unicode could convert into eight bytes of ANSI instead of four bytes.   
      
   I think that you are running into another problem.   
      
   Best you describe what you want to send in to a function and then what   
   you want to get out.   
      
   --- 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