Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
C

cable beach

@cable beach
About
Posts
4
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Quering a COM object in .net
    C cable beach

    Yeah, I tried using reflection, but this still requires you have a reference to the underlying type. In the end I just switched the project to VB.net, and it works. I still find it surprising that there is something vb.net can do that c# can't. Anyway, thanks for your input.

    COM csharp database help tutorial question

  • Quering a COM object in .net
    C cable beach

    Thanks for the answer, but in order to cast, you need to have a type to cast to. In this case, the variable being passed (as an object), is actually a vb6 form, and to get the type means that I need a reference to the vb6 dll, and the form needs to be an exported type. If I was using VB.net (and I have tried this), I can just reference properties of the object without casting, or creating a reference, presumably using late binding to query the object at runtime "under the bonnet" - this is all taken care of for the VB developer. My question is: how can I do the same thing in c#? To clarify the sample code: VB6 code: dim obj as MREPlugin32.MREPlugin ... set obj = new MREPlugin32.MREPlugin obj.Init(Me) VB.net code (this works): public Sub Init(obj as Object) dim location as string = obj.Location End Sub So how can I do this? C# Code: public Void Init(object obj) { string location = obj.Location; // Somehow, without any external references. }

    COM csharp database help tutorial question

  • Quering a COM object in .net
    C cable beach

    I support an application that is a combination of vb6 and .net components. I am trying to replace a vb6 dll with an equivalent in c# but I've got stuck on how to query the properties of a com object that is passed as Object. The vb6 form instantiates a .net object through COM and then passes a reference to itself but as an object, not a specific type:

    public bool Init(ref ADOConn.STConnector db, object MREForm, string user)

    In VB i could query any public variables on the form for example: dim loc as string = MREForm.Location If I use reflection, all I get is the properties of the object type, not the underlying COM type. How can I do the same thing in C#? Thanks for any help on this.

    COM csharp database help tutorial question

  • To test a theory. (Shared Birthdays)
    C cable beach

    Actually, i think they share the same month, not the exact date. This is a theory of combinatorics (the pigeon hole principle) rather than probability. In any event: 13th February

    The Lounge css question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups