More Type/COM fun

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • oddball.bfi@gmail.com

    More Type/COM fun

    Ok - now I've got me stuck again - this time good and proper.

    I've got a Type object for an interface a COM object may (or may not)
    implement. Lets call it IBob

    Now

    IBob bobObject = comObject as IBob;

    if (bobObject == null)
    return "Don't call me Bob";
    else
    return "Call me Bob! If you call me Bobby, I'll kill you";

    That's all well and groovy. But my real issue starts with the fact
    that I have a type object, and that don't work with 'as' as far as I
    know.

    if (iBobType.Insta nceOf(comObject ))
    return "Hi - call me Bob!";
    else
    return "Its Robert.";

    This always return Robert... COM appares to be pathalogicaly opposed
    to being called Bob. What can I do?

    My name is Josh, btw.
Working...