Re: [ADVANCED-DOTNET] Runtime Control Discovery

2003-07-09 Thread Bryan, Jason (Contractor)
Yeap, that got it! Thanks so much to both you and Chad for the help. I just got fixated on using a ControlCollection that I didn't about using another container. :( Thanks! Jason -Original Message- From: Griffiths, Ian [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 11:32 AM To

Re: [ADVANCED-DOTNET] Runtime Control Discovery

2003-07-09 Thread Griffiths, Ian
It looks like a feature of the ControlCollection. In fact the docs say that this class "enables ASP.NET server controls to maintain a list of their child controls". This is a rather specific description, and doesn't necessarily imply that you can use the collection as an arbitrary container of ref

Re: [ADVANCED-DOTNET] Runtime Control Discovery

2003-07-09 Thread Chad M. Gross
If what you are only attempting to do is find the controls, simply change your retval from ControlCollection to ArrayList and your code will work as expected. The problem you are encountering relates to the framework enforcing that a given control can only exist in one ControlCollection and once y

Re: [ADVANCED-DOTNET] ReleaseCOMObject from Managed code

2003-07-09 Thread Charlie Poole
I believe so... But to be certain of what's happening, you might create a little ATL COM object that does nothing but log it's addrefs and releases. Charlie Poole [EMAIL PROTECTED] > -Original Message- > From: Moderated discussion of advanced .NET topics. > [mailto:[EMAIL PROTECTED] Beha

[ADVANCED-DOTNET] Runtime Control Discovery

2003-07-09 Thread Bryan, Jason (Contractor)
Hi all! I am trying to discover and place into a ControlCollection all the controls on a web page that match a particular type or begin with a particular name. To do this, I've written a function that will go through the ControlCollection passed to it and add the controls that match the condition

[ADVANCED-DOTNET] OPC Interop problem: InvalidCastException with VB.NET 2003

2003-07-09 Thread Joris Zwaenepoel
Hi, I'm trying to use OPC (OLE for Process Control) with VS2003 (VB.NET). It worked with VS2002, but the same code in VS2003 throws the following exception: 'System.InvalidCastException' Additional information: QueryInterface for interface OPCSiemensDAAutomation.IOPCGroups failed. The code where th

Re: [ADVANCED-DOTNET] ReleaseCOMObject from Managed code

2003-07-09 Thread TIAGO PASCOAL (Interaction)
Does this include COM references obtained via code like this? : type comType = Type.GetTypeFromProgID("clsid"); object comObj = Activator.CreateInstance(comType); Is it valid (should we?) invoke while(Marshal.ReleaseComObject(comObj) > 0); Thanks. -- Regard your good name as the richest