How can I prevent this from Late Binding?

  • Thread starter Thread starter gregory_may
  • Start date Start date
G

gregory_may

I am using the thread pool.

I would like to prevent late binding, but cant figure out how. When the
WaitCallback function is called, it expects a function prototype with type
OBJECT. My rotuine that does the real work, needs it as a string Array.
Whats the best peformance way to handle this?

Thanks!


Main Routine.
 
Ok, I figured out another problem. I actually want to pass 2 parms to the
process_Inbound_Message_deligate. I could create a structure for this, but
I need the objects ByRef not ByVal. (How do you create a structure with
ByRef items?

Is this possible?

This is sort of what I want? But, I have not idea how to get a Pointer to
a Class or a pointer to a String array. Maybe there is another way to pass
in multiple parms to a ThreadPool? Help. I am being sucked into a black
hole of pointers.




'Do I need a structure to get multiple objects into a threadpool object?

Public Structure ThreadPoolPayload

Public StringArray_Ptr As IntPtr

'Should be a Pointer to a very large String array (not a copy)

Public Client_ptr As IntPtr

'Should be a Pointer to a class instance (not a copy).

End Structure





Main Routine.
 
Gregory,

It is seldom that this does not work.
CType (MyObject, String())

This is a conversion,

When it is real a cast than you can better use
DirectCast(MyObject(), String())

I hope this helps,

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Event Handling in VB.Net + Late Binding 1
Late Binding Issue 9
Avoiding Implicid Conversion? 2
Late Binding 30
late binding error 1
late binding error 1
CreateInstance and late binding 4
another late binding error 2

Back
Top