-
Dispatcher DLL
I have some code that uses a WebRequest/Response. Since i need to check the thread is the same then perform the correct action i have to write code similar to (on the main application)
If <control>.Dispatcher.CheckAccess Then
DoSomething()
Else
<control>.Dispatch.BeginInvoke(New DelegateDoSomething(AddressOf DoSomething))
End If
This works, however i would like to use a dll to hold the WebRequest/Response at the same time i need to address the code posted (so i could pass in the control i.e. control.dispatcher.checkaccess).
Therefore the above code in a dll, gives me the error Reference to a non-shared member requires an object reference. I create an instance but then it has a null reference.
How should i be doing this?
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks