« first day (1504 days earlier)      last day (1676 days later) » 

12:00 AM
RELOAD!
[FreezePhoenix/XtraUtils] 2 commits. 7887 additions. 3240 deletions.
[rubberduck-vba/Rubberduck] 4 opened issues. 2 closed issues. 19 issue comments.
 
12:27 AM
just curious - am I alone in thinking that ASP.NET's dynamic compilation is a security hole?
 
 
2 hours later…
2:25 AM
[rubberduck-vba/Rubberduck] MDoerner pushed commit ccf57f95 to next: Add dependencies on the code analysis project.
[rubberduck-vba/Rubberduck] MDoerner pushed commit 37f84fd3 to next: Added parser tests concerning line continuation covering issue #4196.
[rubberduck-vba/Rubberduck] MDoerner pushed commit f8c3ecdc to next: Fixed definition of LINE_CONTINUATION to make the leading space of tab non-optional.
[rubberduck-vba/Rubberduck] MDoerner pushed commit a3fdee1c to next: Fix tests with broken code because of underscores without preceding whitespace instead of line continuations.
[rubberduck-vba/Rubberduck] MDoerner pushed commit f91d542a to next: Fixed failing tests by allowing line numbers and line labels after line continuations and consuming the trailing whitespace after a line continuation in
[rubberduck-vba/Rubberduck] MDoerner pushed commit d018afca to next: Made the tests pass with a not very pretty modification of the LINE_CONTINUATION lexer rule.
[rubberduck-vba/Rubberduck] MDoerner pushed commit b997085e to next: Fix whitespace vs tab in the lexer.
Merge pull request #4208 from MDoerner/FixMinorGrammarIssues

Fix minor grammar issues
 
2:37 AM
@Comintern What's sad is when you google a question/topic that has you perplexed, only to find the resolution in RD chat or on SO, and find that a wiser you is the author. But at least Google is somewhat private. Worse still is when you ask a question in RD chat, and somebody else responds with a permalink of a wiser you answering that exact question.
 
LOL
 
@ThunderFrame the amount of knowledge in the transcript of this chatroom is quite something
2
 
IKR - only a fraction of it makes it to the Wiki
 
2:42 AM
Pretty sure I went off the deep end with #2775 and #1328. I've refactored a good chunk of the ComReflection namespace already.
 
@Comintern leveraging the typelib api yet?
 
I'm curious to see my line add to line remove count afterward. It should be steeply negative.
@this Not yet. I'm afraid if I look at it too much I'll be overcome with temptation to start poking at the Immediate Window interface. That's a one way ticket down the rabbit hole.
 
heh
 
@this - not sure if this is interesting to you - desaware.com/tech/registeringcomponents.aspx
 
2:48 AM
Would it be dangerous to do lazy evaluation of type names? If I wait to resolve the AsTypeNames until the entire library is processed, it should be a lot more efficient. The only caveat is that they wouldn't necessarily be valid until the entire typelib was processed.
 
we are supposed (already?) to do multiple passes, right?
 
@Comintern but is it still relevant once we leverage the TypeLib AIP?
@this IIUC we do that in the type annotation resolver pass
 
> VersionStamper is included for legacy application support, we do not recommend it for new development.

Learn more about VersionStamper

Buy Desaware's VersionStamper as Part of the COM Universal bundle for $649 or Buy COM AND .NET Universal packages for $995 .
That struck me as hilariously ironic. "It's old but we'll charge you a lot of money for it"
That said, that was interesting read but largely inapplicable because we aren't using any external program to register our COM programs (and IMHO, we shouldn't be).
VersionStamper would have been of interest but that line above stopped me.
 
hmm #2775 is lower-level than the type annotation pass. ignore my last two comments :)
 
3:03 AM
@this Yes and no. It's currently grabbing names for things as strings if they haven't been processed as full object yet. One case would be something like this:
    if (!IsEnumMember || !ComProject.KnownEnumerations.TryGetValue(_enumGuid, out ComEnumeration enumType))
    {
        return;
    }
    var member = enumType.Members.FirstOrDefault(m => m.Value == (int)DefaultValue);
    DefaultAsEnum = member != null ? member.Name : string.Empty;
That's in the function parameter resolution. I think it currently hits all on all of them that it should (or at least most), but if they process out of order, you wind up with things like "As Integer" instead of "As vbColor".
Both are perfectly valid declarations from the standpoint that VBA "sees" vbColor as an Integer internally, but it isn't as shiny in the status bar that way.
@MathieuGuindon The type annotation pass is getting Declarations. so the COM member names have already been cast in stone as strings at that point.
 
yeah
you'd need two passes to keep the iteration order irrelevant
 
However, we're not doing anything with the type names currently that would be impacted by this. It would only be enumeration members and aliases.
I guess in theory a const could be declared as an enum member, but I've never seen one.
 
we must have a number of ideas waiting for this :)
 
lol
Makes sense though, you shouldn't be writing code like MsgBox("Foo, 2).
 
hmm, #2255 is kind of related
 
3:13 AM
I still want to replace the Declaration objects with these at some point. That would pretty much end the scope resolution problems from string matching.
We could leverage the crap out of @WaynePhillipsEA's internal typeinfo API and build an "scope tree'.
 
that would be awesome
 
just so I understand - scope tree is different from syntax tree how?
 
Would also be a hell of a lot of work. The entire resolver would need to be redone.
 
@this They would mirror each other.
 
3:16 AM
@this TypeLib won't give us the executable statements
(right?)
 
no, but i'm thinking more about the scoping than executability
that info is given in the syntax tree, right?
 
The resolver would attach a context to so a UserDefinedModule or a ComModule. We'd then use that like we use the Declaration now.
We'd also "fill in" the procedure implementations.
 
@MathieuGuindon ironically this is referenced by a PR:
> Big refactor of COM reflection. All your TypeLib are belong to us. #2462
 
^ IKR!
 
One huge benefit of that is that it would be fairly trivial to make the ComProject walkable.
 
3:19 AM
hmmm and that means a better OB?
 
and half of RD rewritten :)
 
So... if your identier reference is inside a UserDefinedProperty, it would walk up the tree checking to see if it was in each parent's Members collection.
 
that's slick
 
The structure itself would dictate scoping, because it would basically define it.
 
and the memory footprint would then ..melt.
 
3:23 AM
Yep. And the caching problems. And the performance issues for huge projects due to the reference finder. And a bunch of other problems like over-reliance on identifier names.
 
and 9 flattened declaration lists were given to the humans, who above all craved for power. but they were all fooled, for another tool was forged in the blazing hells - a tree to rule them all.
 
We could finally finish kicking the qualified names to the curb, because it would just be ParentName.Name.
@MathieuGuindon LOL
We just need to scale Mt. Doom first.
 
the big question is, do we do that before or after integrating Avalon?
 
> We wants it. We needs it. Must have the precious. They stole it from us. Sneaky little Hobbitses. Wicked. Tricksy. False.
 
Huh. I already have code in the COM collector that kind of addresses #419.
 
3:26 AM
so the inspection is enabled then
 
@MathieuGuindon well, what we're talking about is basically lobotomizing the ducky, no? Therefore, best to do Avalon after.
 
LOL, Oh yeah, it was my sample above.
 
It checks a default value and translates it into the matching enum member.
 
3:27 AM
@this basically, yeah. a brain transplant. wouldn't be the first =)
 
how many has the ducky had?
 
@this Nah, more like treating it for a multiple personality disorder.
 
just don't talk about the olewoo over there....
 
Oh yeah, I just remembered the other huge implication it would have.
Each UserDefinedModule could know it's own code, so you could parse individual methods
 
3:32 AM
at first there was a shitty regex-based kind-of-tokenizer. then with v1.2 Antlr came along, and my shitty painter-algorithm resolver survived until ~v1.3 IIRC. then it awgaya rewrote the heck out of it, Max took it over, and so far that's surviving throughout 2.x
so... 4th?
yet, Declaration and IdentifierReference have been around all along
 
and progressively getting hairier and uglier
 
well, more the Declaration
 
IdentifierReference isn't that bad.
 
3:34 AM
there's a CR post from 2015 voicing concerns over the design of Declaration
 
I should request a language feature for c#7.next - I want to be able to use auto-properties as out parameters.
 
@Comintern it really feels like it should already work and it was just an oversight. I'd support that feature!
 
IKR? I keep catching myself trying to write them.
 
I might have started writing something that might end up being a book
well, a draft outline anyway
 
3:48 AM
I should apparently write a book about TypeInfos in that Google apparently thinks I'm some sort of authority on it's members...
...although what I really want is somebody else to do that so I can read it.
 
@Comintern lol! ....but aren't you one? :)
 
Yeah, it's written in c# though.
I think Google's search algo for things like PARAMFLAG_FOPT are just wacked.
 
@Comintern so Sean Baxter wasn't good enough?
 
No, his stuff is awesome.
 
</tongue-in-cheek>
 
3:56 AM
Damnit! I must not have used PARAMFLAG_FOPT here before. Now it's going to pollute my search results the new time Google indexes the chat history.
 
are you still on page 1?
1
Q: How to get the default value from PARAMDESC

MatzeI am using the ITypeInfo interface to obtain information about COM objects and their members (in order to build some kind of reflection API). Reading types and members (and their parameters) works fine, but I don´t know how to access a parameter´s default value. This is what I have... ... PARAM...

Sean Baxter is on page 5: yanaware.com/com4me/…
odd... I'm not getting any search results linking to here.. Google is messed up.
 
That might move it up a spot or two.
And no, Google, I did not mean "PARAM DESC".
That's Hans' answer.
Weird. I wonder if it's because I'm signed in under the same ID. I could totally see Google trying to "remind me" of what I'd said before.
 
now I wonder if Rubberduck really does come up on page 1 for "vba ide add-in" or "vba tooling"
 
4:11 AM
@Comintern it used to be that double-quotes helped to bring back exact matches. iirc, a + sign used to force that term to be present, but it seems inconsistent these days
 
And the question is, "will it build"?
@MathieuGuindon That I know comes up. I don't sign in with my personal gmail account at work.
 
@ThunderFrame Yeah, I noticed that they broke that. Makes it hard to find pdfs.
 
@ThunderFrame BTW, a co-worker got the new Office toolbar in her Windows updates last night. It only installed in Access and Word, but for some reason didn't in Excel. It made Access completely unusable.
 
 
@MathieuGuindon We link to all 3 articles in that series (the other 2 of which aren'on yanaware, iirc), from the wiki. - brakmic.com/iunknown/tag/com - but I see now the link is broken
@Duga slap me for putting a comma in a page title
 
403 forbidden!
 
WOAH! WTH?
oleview.exe is a drag and drop target!
How did I not know this?!?
 
hm not sure this is working.
 
@MathieuGuindon I'll update the links
 
4:26 AM
i dragged 2 DLLs but I get same results
 
@Comintern ++ for red marker, but you should try Greenshot
 
@this Try dragging an Excel element.
 
I'm using GIMP personally. I'm just lazy. :-P
It's the nuclear overkill editor for hand drawn red circles.
 
Just get Greenshot, damnit; it's free and it will change your (screenshot) life
 
4:32 AM
i might be doing it Wrongâ„¢, but it doesn't come up differently.
Greenshot is great when you don't have Mac.
 
comintern@fidel ~/Rubberduck $ sudo apt-get install greenshot
[sudo] password for comintern:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package greenshot
 
think greenshot is windows only
 
@this Wait is someone trying to run Rubberduck on a Mac!?
 
I wish. :(
No, I just use a Mac to run my Windows VMs.
 
4:34 AM
 
Why, yes I'm a Microsoft-stack developer on a Mac. Heresy!
 
@this You can't install it on the Windows VM?
 
That's what you get when you drag a VBA project into oleview.exe from the project explorer.
 
hmm. not dragging from PE....
@Phrancis I could but I have Preview, so.... I'm happy.
 
Microsoft actually made an IUnknown interface?? 😱
I guess it's kinda like JavaScript, if you can't afford it to crash, just assign garbage data or undefined to it
 
4:38 AM
Weird. I can DnD UF but not a VBA project or document class.
 
Woah, it has all the project references in it.
 
figured it out - it won't work for unsaved workbook
(duh)
 
It would've taken me a while to figure that one out
 
There's one for the VBE Reference Edit control.
I need to miss when I'm DnDing things more often.
 
I wouldn't not not trust Microsoft to make a user friendly interface
 
4:53 AM
I feel like Dave in 2001 - "My god, it's full of type definitions".
 
@Comintern I looked at the DnD content a while back, I could get info from the Project, iirc, but I wasn't using OleView as the drop target. I made my own. iirc - it was just a list of files. What you've found is way more interesting
@Comintern There should be an inspection for don't use RefEdit control - it's a corruptor of projects/state
 
"Found" might be a stretch. Stumbled on is more accurate.
I think it might be every single type that's loaded in both the VBE and Excel.
Windows Script Host Object Model?
 
@MathieuGuindon Rubberduck wiki now has the most complete set of links to the Sean Baxter articles - and I made them all archive.org links, so hopefully they won't die.
 
@ThunderFrame nice!
 
5:07 AM
@ThunderFrame wouldn't it be better to download the content and store it on our wiki directly? (IDK if archive.org can rot)
 
@this I'd rather leave the copyright lawsuits to archive.org
 
yeah
 
:claps: Thanks!
Oh, hai, RD.
 
i might be missing something blindingly oblivious but when I dnd a vba project I only get a IUnknown interface and nothing else
(and yes the vba project has code and stuff)
 
@this Click on IUnknown. It walks everything from there.
 
5:16 AM
that's what I get if I doubleclick on the tree
clicking it on the right pane does nothing
 
Huh, that is indeed the GUID I'm looking at. Are you using the oleview with matching bitness?
 
"C:\Program Files (x86)\Windows Kits\8.1\bin\x86\oleview.exe"
and Excel is 32-bit, too, so. yeah
 
Weird. Mine just popped right up. Excel 2013x64
 
what are your cocreateinstance flag set to?
IDK if that has any bearing
 
Holy crap, that ran so much faster I didn't think it did anything.
2018-07-19 00:21:06.5653;TRACE-2.2.6774.517;Rubberduck.Parsing.VBA.COMReferenceSynchronizerBase;Loading referenced type 'ADOR'.;
2018-07-19 00:21:06.5756;TRACE-2.2.6774.517;Rubberduck.Parsing.VBA.COMReferenceSynchronizerBase;Loading referenced type 'ADODB'.;
2018-07-19 00:21:06.6534;TRACE-2.2.6774.517;Rubberduck.Parsing.VBA.COMReferenceSynchronizerBase;Loading referenced type 'Scripting'.;
2018-07-19 00:21:06.6534;TRACE-2.2.6774.517;Rubberduck.Parsing.VBA.COMReferenceSynchronizerBase;Loading referenced type 'VBScript_RegExp_55'.;
All the reference libraries that we serialize in .31 seconds.
 
5:23 AM
nice!
 
5:35 AM
> Getting ready to address some more type naming issues - see #2775 and #1328. Also did some small (but surprisingly effective) performance tweaks.
[rubberduck-vba/Rubberduck] build for commit ac251a06 on unknown branch: AppVeyor build failed
BUILD FAILURE!
 
@this and besides, I donated $100 to them last year, so they should be good for a while. I just wish there was a search capability for a particular timeframe, not just "give me this specific URL for whatever dates you have." I can't imagine that temporal search would take much resources....
 
6:04 AM
> It occurred to me that a referencing project will only ever see the public members of a referenced project, regardless of whether that project is protected, or has its protection removed during a VBE session.

If a project, say `DBUtils` is referenced, but protected, then RD currently skips it entirely, but it should perhaps be using the TypeLib API to get the public declarations, and if the project is subsequently unprotected, then RD should do a full parse and resolve on the next parse, of
 
@Comintern ^ I lost my work on submitting that comment, and despite a second rewrite, I'm still not certain that I'm being clear. Does it make sense to you?
 
Yeah, I think I follow that fairly well.
TTGTB
 
 
1 hour later…
7:33 AM
grabbed the latest changes
@this could just quickly let me know the difference between these two settings in the project dependency please. not clear about these
saw the conversation with Max earlier about the build fails still have the 412 and seeing if I could check my settings again.
wow. I believe I should NOT touch the settings file...
no way to close or change my mind about options...
ah sod it. Closing the application and having a rest.
 
8:26 AM
@Comintern @MathieuGuindon The idea of a scope tree is really not new. I mentioned at least three times already in this chat that that is the standard approach to build symbol tables, which is also explained in the corresponding book by the Antlr guy. We simply do not do it that way.
I would also like to add that resolving probably be slower not faster using the scope tree alone. Name collisions are not too common. So first doing a dictionary lookup for the name is rather efficient. If there are multiple matches, you can still fall back to a scope analysis.
Moreover, our Declarations are already kind of a scope tree, just without the resolve method. They just need a cleanup, for which there is already an issue. (Nothing should ever use the base class.)
We also cannot get rid of the QMNs. We need these as a proxy for the components. Remember that we must not distribute COM object everywhere because they require proper cleanup. Otherwise, our crash on exit will just become worse again.
 
8:47 AM
> I think this issue is kind of intertwined with #3041.

When we implement a setting to choose projects that should only be loaded from the typelib (as built-in declarations), we could add an option to add all protected projects to the list automatically.
Then, temporarily unopotecting will not change how RD treats the project. Moreover, you can opt out of the automatic addition and manually revert the status.
> I do not see what you are getting at regarding parsing multiple times. We ever only parse a project/read in a referenced library once and then resolve all references from all referencing projects based on all the declarations we have and the scoping rules.

We actually add some caching so that we do not reload referenced libraries or parse modules unnecessarily.
 
9:26 AM
@PeterMTaylor the one without the dot in the middle is a RoslynAnalyzer that makes sure we deal with COM correctly
it's not part of what we ship in the end
 
9:46 AM
1
Q: Dijkstra's algorithm implemented in Excel VBA

neelsgI wanted to implement Dijkstra's Algorithm in an Excel VBA Add-In and built it to be used as follows: Define a list of paths with distances between points. This list needs to contain 3 headings that are used as flags to pick up where the list is. The 3 headings are !dijk:dat:from, !dijk:dat:to ...

 
 
1 hour later…
11:02 AM
> @MDoerner - I'm unsure if you missed my point. A project that refers to another project should only ever know about the public decorations, parameter and return types of the referenced Project, and despite my first comment, that doesn't change, regardless of whether the referenced project is or isn't protected, or was protected and became unprotected. But a referenced project that opens as protected, but is subsequently unprotected, will itself subsequently need to have all of its public *
 
11:32 AM
> I still do not get your point. The resolver adheres to the scoping rules, which means that a reference to an object in a referenced project/library only ever resolves to a public object. We do not specifically present a set of declarations from a referenced project to the referencing one. We always use all declarations and apply the scoping rules, which means that private objects in a referenced project are not visible to the referencing project.

BTW, whenever the protection status changes
 
11:50 AM
@M.Doerner ok, I understand. I was forgetting that RD adhered to the scoping rules of the referenced project. The protected nature of the referenced project is moot in that regard, other than this will be the first time that we've been able to parse members of a protected project.
 
@PeterMTaylor You need to check the Rubberduck.Interaction, Rubberduck.Refactoring and Rubberduck.Resources and ensure that each has the RubberduckCodeAnalysis project checked off as a dependency. You could also copy the changes to the .sln file from Max's PR.
 
@this FWIW that PR got merged, so an update from next should also be enough
 
oh ok, missed that
 
> # [Codecov](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/4127?src=pr&el=h1) Report
> Merging [#4127](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/4127?src=pr&el=desc) into [next](https://codecov.io/gh/rubberduck-vba/Rubberduck/commit/9d5f49a5e60e66eed77236da94402087a9dd86c0?src=pr&el=desc) will **increase** coverage by `0.55%`.
> The diff coverage is `92.74%`.


```diff
@@ Coverage Diff @@
## next #4127 +/- ##
=======================
> # [Codecov](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/4127?src=pr&el=h1) Report
> Merging [#4127](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/4127?src=pr&el=desc) into [next](https://codecov.io/gh/rubberduck-vba/Rubberduck/commit/9d5f49a5e60e66eed77236da94402087a9dd86c0?src=pr&el=desc) will **increase** coverage by `0.58%`.
> The diff coverage is `92.81%`.


```diff
@@ Coverage Diff @@
## next #4127 +/- ##
=======================
[rubberduck-vba/Rubberduck] build for commit 58e4d6f9 on unknown branch: 52.81% (target 0%)
[rubberduck-vba/Rubberduck] build for commit 58e4d6f9 on unknown branch: AppVeyor build succeeded
 
1:40 PM
> I was thinking - the com collector stuff are in the Rubberduck.Parsing. It deals a lot with COM particulars, involving pointer and unmanaged types management. Would it be better to separate that into its own project, so that there is no direct dependency on COM stuff from within the Rubberduck.Parsing project? Thoughts?
 
0
Q: copy and pasting a scoreboard using vba

Mugabi Onesmushelo,i am a bit green in vba . I want to create a code that allows me to copy and paste my scoreboard plus resize the rows as many times as possible. but only pasting one copy for each run.

 
1:58 PM
@Duga If we do move the COM stuff, let's wait until it's been in "production" for a while - rearranging the files blows away the history that is easily accessible via VS git integration.
 
2:10 PM
@Comintern no rush, really. TBH, I'm not sure if there's any gain in doing so. It was a good thing for the safe com wrappers now that we have the abstraction in the VBEEditor project, which allowed us to remove all references to PIAs in all other projects so that trying to use a RCW type directly will light up red. In com collector's case, though, we're mainly using stuff from System.InteropServices namespace.
 
Pretty sure the only _ComObjects are the typelib structures, and I doubt the lifetime management of those is much of an issue.
Well, other than my leaky ComVariant. :blush:
 
lol
Yeah. Unlike the RCWs, we usually don't need to hold them beyond the scope of the method that bought them into existence, which simplifies the management providing that we plugged all leaks.
 
The Variant thing might prompt me to address #4172, although I'm not entirely sure that the COM collector needs the full fidelity there, given the rules for what you can define as a constant.
 
2:26 PM
COM Collector might not need it but we'll definitely need it when we finally unify and clean up the expression engine
 
^^
I was also looking at #4050 and realized that was why we're getting build warnings about our public interface. COM wants then to be Variant instead of Object.
 
are you referring to the MIDL compiler warnings about optional argument needing to be *VARIANT?
 
Yes,
 
My worry is that in order to fix that, we lose the strong typing
 
Hmmm... How does the marshaller handle them? IIR they should be VT_ERROR?
 
2:32 PM
in this case, they can't be used with IsMissing()
it's no different from when you do the same thing in VBA, actually.
given a Public Function Foo(Bar As String, Optional Baz As FancyPants)
omitting the Baz will cause it to be initialized with Nothing and IsMissing will return false.
Because most of those warnings are for a reference type, we don't have that problem.
since Nothing says just as much.
If we were passing a value type, then yes we might have a problem.
since a Optional Baz As Long will be always 0 and IsMissing(Baz) = false, but 0 may have some meaning.
 
I was mainly thinking of the managed side. Although if they're marshalling as VT_ERROR, would the overload without the optional parameter ever be called from unmanaged code?
 
Mind you, I'm assuming that the behavior we see in VBA applies equally to what we do with our TLB. That may be incorrect.
we expose overloads?
Pretty sure we shouldn't be (can't?)
 
Not directly, but my understanding was always that the CLR builds 2 versions of the function anyway. Kind of like you "manually" overloaded it instead of adding an optional parameter.
 
hmm. I would have thunk it illegal in context of MIDL
 
Oh yeah, right. Forgot about the naming constraint there. I was thinking about it from the other side.
 
2:40 PM
@this you get a COM interface with DoStuff1 and DoStuff2
 
confirmed:
[
  uuid(F342A9DC-6226-4948-A532-712779004277),
  version(1.0),
  helpstring("Lame")
]
library lame
{
	const BSTR MoreLameConst = "foo";

	[uuid(F342A9DC-6226-4948-A532-712779004278)]
	interface ILame {
        [entry("(null)"), helpcontext(0x000f650c)]
        VARIANT_BOOL _stdcall EOF();
		[entry("(null)"), helpcontext(0x000f650c)]
        VARIANT_BOOL _stdcall EOF([in] short FileNumber);
	}
}
C:\Temp>midl C:\Temp\Lame.idl
Microsoft (R) 32b/64b MIDL Compiler Version 8.01.0622
Copyright (c) Microsoft Corporation. All rights reserved.
Processing C:\Temp\Lame.idl
Lame.idl
Processing C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um\oaidl.idl
oaidl.idl
Processing C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um\objidl.idl
objidl.idl
Processing C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um\unknwn.idl
unknwn.idl
Processing C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared\wtypes.idl
 
huh
#nomagic
 
so yeah, overloads definitely not possible in context of type library.
 
The fact that I never remember how .NET makes COM visible tlbs speaks volumes about which side I'm usually looking at them from...
 
Makes sense because the overloads are language constructs. Language constructs would violate the COM's language-agnostic-ness.
It's also why you have to have the attributes [propget]/[propput]/[propputref] -- that's the only case where you can "overload"
though I'm sure that the underlying implementation will do some mapping from Foo to get_Foo/put_Foo/putref_Foo.
 
2:44 PM
so how COM-visible .NET types expose overloads is just .NET COM interop "translating" overloads into something that's legal COM-wise
 
do you have an example of where we actually expose overloads from .NET?
I thought we currently don't.
 
System.ArrayList has a bunch
 
Hmm.
not seeing it in the oleview....
the only one, Item, is simply the property.
but given this....
[id(0x60020002)]
long Add([in] VARIANT value);
no scratch that. Add isn't overloaded.
CopyTo is, though, but we only have one CopyTo defined in the oleview
[id(0x60020000)]
void CopyTo(
                [in] _Array* Array,
                [in] long index);
 
huh, OB isn't showing any members for ArrayList
 
the _ArrayList is an empty interface.
all the methods we actually use come via other interfaces.
 
2:52 PM
ok found one
 
ILease is where?
mscorlib?
 
yeah
ICustomAttributeProvider.GetCustomeAttributes is also overloaded
 
[id(0x60020000)]
HRESULT Register(
                [in] ISponsor* obj,
                [in] TimeSpan renewalTime);
[id(0x60020001),
  custom(0F21F359-AB84-41E8-9A78-36D110E6D2F9, "Register")]
HRESULT Register_2([in] ISponsor* obj);
[id(0x60020002)]
 
makes sense
 
I bet you that it's decorated.
 
2:55 PM
as in, there's an attribute on the overload mapping it to Register_2?
 
apparently not. That's what I thought.
[System.Runtime.InteropServices.ComVisible(true)]
    public interface ILease
    {
        [System.Security.SecurityCritical]  // auto-generated_required
        void Register(ISponsor obj, TimeSpan renewalTime);

        [System.Security.SecurityCritical]  // auto-generated_required
        void Register(ISponsor obj);
must be a COM interop thing, then.
 
since it knows that it can't marshal those 2 methods, it fixes mangles up the overloads automatically
 
you can expose an overload, and the tlb will automagically expose the two as separate, numbered methods
well, except the first one anyway
 
depends who is generating the TLB, mind.
If I tried to write an IDL file by hand, I gonna be slapped
 
2:57 PM
@this probably, yeah
lol
 
well, #TIL.
i wonder if that behavior is retained when we do convert a Assembly to ITypeLib.
(which is what we are currently doing in order to build the IDL in our build system)
 
@this That's right, IsMissing only ever returns True if the optional parameter is a Variant. I smell an inspection.
 
yeah it's easily in top ten of most misunderstood/abused functions
 
@ThunderFrame me too :)
 
3:29 PM
> `IsMissing` is widely misused. It can only ever return `True` if:
- the variable is a `Variant`
- the variable is an optional parameter

RD should have an inspection that identifies usages of `IsMissing` with any other variable type.
> `IsEmpty` is widely misused. It can only ever return `True` if:
- the variable is a `Variant`

RD should have an inspection that identifies usages of `IsEmpty` with any other variable type.

Note that usages that involve a default member, like `IsEmpty(myRange)` are valid, because the default member of a `Range` returns a `Variant`.

See also #4212
 
makes me wonder how many people tried to do IsNull(myStringVariable)....
(mind, I don't think I've recalled running across that particular misuse but ? )
 
misusing IsNull is probably more common among Access devs, no? Excel devs seldom even know of its existence
 
> The installer and about box bear this mention since forever:

> © Copyright 2014-${YEAR} Mathieu Guindon & Christopher McClellan

The project's website page footer says otherwise:

> Copyright © ${YEAR} Rubberduck VBA - All rights reserved.

When I transferred ownership of the repository from my account over to the 'rubberduck-vba' GitHub organization, it was to make it easier to collaborate and work as a team. Throughout the years, core contributors and domain experts have turned my i
 
@MathieuGuindon As I said, I never actually see that misuse in Access vba project, even those that are sloppily written.
or at least can't remember
 
3:40 PM
it's very hard to avoid working with nulls in Access, actually.
 
I could totally see 2004-me doing that :)
 
lol
I think it's more likely that a C# kid will misuse it when cowboying up a legacy VBA project.
 
that too
 
@Duga @MathieuGuindon you might want to rethink this -- you're sitting on a project worth $3,757,172. ;-)
 
> Question is, is "Rubberduck VBA" an entity that can assert copyright?
 
3:53 PM
@Duga Excellent question!
@this sorry, mate, there's no value to your build script contributions...
 
LOL
 
@this you've forgotten to subtract technical-debt.
 
tell that to them. they're the one doing the math, not me.
 

« first day (1504 days earlier)      last day (1676 days later) »