With a couple samples working I'm in the middle of creating something for the real world. So far everything has been relatively predictible until I get to the call to GetHostObject(), which is returning NULL. Specifically, the following line in the Proxy.cs:
this
.remoteObject = this.providerHost.GetHostObject(...)
As I step through this line of code it naturally jumps into my HostItemProvider Class, which checks the incoming type and returns an instance of my Host Item. Unfortunately, after the call recturns I check the value of this.remoteObject and it's "null".
Now I've seen this before when there's a problem with not matching the type passed in, or if I return a reference to an object that's set to "nothing". What's driving my completely nuts is that I am stepping line-by line through my GetHostObject() method and when I get to the End Function statement, I hover over the GetHostObject function name, and it IS populated with a valid object. Then I step out of the method and back into the Proxy.cs and check this.remoteObject, and it's "null" so I end up failing the check for null and ultimately get the "Failed to get host object during Entry Point creation".
I must say I've never seen anything like this before. I'm assuming it has something to do with all the magic going on in the pipeline / proxy object translation stuff, but I'm at a loss. I'm doing this all in one solution with a couple projects with no frills.
I'll keep poking and simplifying things until I get something to work, but if anyone has a guess, I'm all ears.
Snowball thrown...
Thx.