|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Avoiding Implicid Conversion?out how to type the threadpool call back. Below is a snip of my code. The "process_UDP_Message" needs to pass a byte array .... but the Call Back only passes back a generic object. Anyone know how I can force the type of "receiveBuffer" when I make the call to process_UDP_Message? 'Main processing loop: If Not ThreadPool.QueueUserWorkItem _ (New WaitCallback(AddressOf process_UDP_Message_deligate), ExactBufferSize) Then Debug.WriteLine("Could not queue to thread pool.") End If Private Sub process_UDP_Message_deligate(ByVal RecieveBuffer As Object) 'We are "late binding" & converting the object back to a byte array. Not sure 'What the performance of this is? process_UDP_Message(RecieveBuffer) End Sub Private Sub process_UDP_Message(ByVal RecieveBuffer() As Byte) 'Process Message > process_UDP_Message(RecieveBuffer) process_UDP_Message(CType(RecieveBuffer, Byte()))Mattias -- Mattias Sjögren [C# MVP] mattias @ mvps.org http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com Please reply only to the newsgroup. thanks!
Show quoteHide quote "Mattias Sjögren" <mattias.dont.want.spam@mvps.org> wrote in message news:urPvyL0MGHA.2704@TK2MSFTNGP15.phx.gbl... >> process_UDP_Message(RecieveBuffer) > > process_UDP_Message(CType(RecieveBuffer, Byte())) > > > Mattias > > -- > Mattias Sjögren [C# MVP] mattias @ mvps.org > http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com > Please reply only to the newsgroup.
by default, public or private?
Getting current user name Reference to a variable need help on DateDiff function! Getting Color Depth / Quality of display adpater / screen Replace Selected Text printing problem with dotmatrix printer using vb.net Which collection object to use similar to SortedList\Hashtable BindingSource.AddNew Properties of a Property |
|||||||||||||||||||||||