Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: CreateThread API


Message #1 by Brian Walk <walkbk@e...> on Fri, 29 Jun 2001 09:05:30 -0700 (PDT)
thanks for the link it helped .... i think i will work on this one on monday

On Fri, 29 Jun 2001 10:45:34 -0700, professional vb wrote:

>  Brian,
>  
>  you can find a lot of documentation about using CreateThread in VB, but
>  the best I found is in the desaware web page:
>  
>  http://206.169.23.10/articles/threadingl3.htm
>  
>  the basic is: you cannot use CreateThread in VB and hope that it works.
>  It is because VB is build on top of COM, and how COM
>  implements threads. Basically, VB is single threaded, and the
>  only way to go around it is to play by the rules and use an
>  ActiveX exe component to start a separate thread.
>  
>  Good luck,
>  
>  m.
>  
>  
>  > -----Original Message-----
>  > From:	Brian Walk [SMTP:walkbk@e...]
>  > Sent:	Friday, June 29, 2001 9:06 AM
>  > To:	professional vb
>  > Subject:	[pro_vb] CreateThread API
>  > 
>  > I am using the CreateThread API to allow my program to transfer data to
a
>  > handheld device while the rest of the program functions normally. This
>  > works
>  > fine when I am running the .vbp but when I run the .exe it returns an
>  > error.
>  > "The instruction at "0x660d63c0 referenced memory at 0x0000009c. The
>  > memory
>  > could not  be written." All of the data is transfered but it blows up
my
>  > project. Does anyone know why this is occurring and is there a way for
me
>  > to
>  > fix this.
>  > 
>  > 'code
>  > llngErr = CreateThread(ByVal 0&, ByVal 0&, AddressOf DoDesktopToDevice,
>  > ByVal 0&, ByVal 0&, glngThreadID)
>


  Return to Index