473,326 Members | 2,126 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

COM Interop: Cascading default properties

***
I posted this in the interop newsgroup, but I'm not sure
if it'd get answered there. I didn't want to cross post
and possible bug everyone, so sorry if I made a faux-paus.
***

I'm writing a .NET component to expose to COM and I'm trying to emulate
an existing COM interface from a previous product.

Basically, the current COM allows for something like this (in VB6):

bizObj("title") = "foo"

bizObj has a default property Fields which returns an AdoField20
object which has a default property Value. So you can see that it
cascades down the tree, basically.

I'm almost there, but the problem is, tlbexp and/or regasm /tlb don't
properly handle default indexers that return a reference type.

What I need is this (in IDL):

[id(0x00000000), propput]
HRESULT Item( [in] VARIANT index, [in] VARIANT value);

But Tlbexp spits out:

[id(0x00000000), propputref]
HRESULT Item( [in] VARIANT index, [in] VARIANT pRetVal);

The propputref is what's killing me, I'm pretty sure, instead of a
propput.

I read somewhere a post by an MS employee basically saying that this
is the case and you're SOL.

Has anyone come up with any type of clever way around this?

Is there a go-nuclear option like manipulating the IDL manually
or something if I'm willing to throw my hands up?

This doesn't have to be super elegant, just as long as it works.
It's legacy support code, so it'll be going away in a couple years
and won't be maintained (it's an EOL product out of the gate).

I've used oleview to decompile the IDL, modify it, MIDL it, then
regtlb it but things just go downhill quick. It seems that it's also
a problem with the CCW.

Can I do some custom marshalling wizardry or something?

Please help!

Thanks,
-Chad
Nov 16 '05 #1
0 969

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: JMosey | last post by:
Not sure if this has been covered ( a google search came up pretty bare). I have a site that: - has multi-level cascading menus - floats center of the browser window - Will have fairly heavy...
20
by: Razzie | last post by:
Hey all, I'm really going through a small hell right now - I've completely lost it :) I made a project, using two interop libraries from exchange (created them as in this msdn article:...
19
by: LP | last post by:
I am using (trying to) CR version XI, cascading parameters feature works it asks user to enter params. But if page is resubmitted. It prompts for params again. I did set...
4
Rabbit
by: Rabbit | last post by:
Cascading Combo/List Boxes This tutorial is to guide you in the creation of Cascading combo/list boxes. That is when you have multiple combo/list boxes where the selection of an option in one...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.