« first day (1505 days earlier)      last day (1675 days later) » 

12:01 AM
RELOAD!
 
meh, decisions... might pick up the ram first, there's a useful discount on amazon warehouse that may not hang around
 
I give my VM 8 gigs of RAM and 2 cores and it seems to do OK. If it bogs down, restarting Visual Studio usually helps more than anything.
 
[bruglesco/InventoryDesktop\‌​] 2 commits. 104 additions. 25 deletions.
[FreezePhoenix/XtraUtils] 2 commits. 2371 additions. 302 deletions.
 
I really need to bump up to 32 myself.
 
[rubberduck-vba/Rubberduck] 11 commits. 4 opened issues. 2 closed issues. 16 issue comments. 840 additions. 110 deletions.
 
12:01 AM
not many options for 2x16gb ddr3 - really only crucial manufacture it afaict
in non ecc at least
 
You do have ECC on the raid machine though, ....right?
 
not an option :-(
 
Huh.
 
qnap ts-879. soho box, no ecc
 
12:03 AM
> Error:Trying to declare WdKeydown
'REMOVER
Public Sub AddKeyBinding()
With Application
CustomizationContext = ActiveDocument
.KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyControl, wdKeyShift,
**Dim WdKeydown As Variant** ' <=== RUBBERDUCK fix
WdKeydown),_
KeyCategory:=wdKeyCategoryCommand,Command:="FORMTOVAR"
End With
End Sub

______________
'REMOVER
Public Sub AddKeyBinding()
With Application
.KeyBindings.Add KeyCode:=BuildKeyCode(w
 
I guess for my file server I had ECC support as one of the motherboard "must have" features list though.
 
got it for a crazy low price though and its been solid
yeah, a parity fail in the wrong spot would be... unpleasant
 
I build mine from components. Easier than finding a SMB grade server that was rack mountable.
 
ima do that next time around
meh, i'll leave this vm installing vs 2017 overnight
 
That reminds me, it might be time for me to start shopping for drives...
 
hopefully tomorrow I can get back to the VB6 project!
ttgtb
 
night
 
Duck check: When working with a ViewModel is it bad to rely on the IsChecked menu item to be unchecked when another is selected?
 
> What build are you running? This should have been already been fixed in RD next.

![image](https://user-images.githubusercontent.com/8944005/42976654-7281866e-8b88-11e8-96f3-93505f215865.png)
 
12:38 AM
= vbNullString is not the same thing as IsEmpty(). Consider a cell containing the formula ="". — Comintern 5 mins ago
This is why Naming Matters™.
 
oh c'mon. VBA gives you so much choices! We have vbNullChar, Null, vbNullString, vbEmpty, and for those with more discriminating taste, an empty or an error variant!
just choose whatever you like. they're all the same, man.
 
lol
I'm halfway surprised that VBA never introduced something idiotic like Option Null 0.
 
1:29 AM
> The quick-fix for the triggered `UndeclaredVariableInspection` **_is_** broken though. It shouldn't be adding a `Dim` inside another context.

This is a stripped down example without the nested functions, named parameters, and line continuations:

```
Public Sub Example()
Debug.Print Bar(x, y, z)
End Sub

Public Sub TestSubjectAfterQuickFix()
Debug.Print Bar(
Dim x As Variant
x,
Dim y As Variant
y,
Dim z As Variant
z)
End Sub

Private Function Bar(x As Integer, y As
 
 
1 hour later…
2:31 AM
1
A: Can a GitHub Organization assert copyright?

apsillersI would not expect that Rubberduck VBA, as an unicorporated organization the lacks legal personhood, is an entity that can own a copyright (though this may vary by jurisdiction). Furthermore, unless you and the other authors performed a transfer of title to Rubberduck VBA, the copyright of each c...

 
yeah, jives with what little I know --- legal personhood is pretty important.
I like the idea of moving to contributors, rather to a (non-person) organization
 
IOW if you want Copyright © 2014-2018 Rubberduck VBA, you register "Rubberduck VBA".
could be a NPO
 
I wonder if that's a service that the FSF provides.
Probably not. They're copyleft.
 
might be I don't grok OSS after all
 
Richard Stallman does not approve of Microsoft.
 
2:40 AM
or I'm some kind of software communist
for the ducky!
 
ducks of the world, unite!
 
> We are Rubberduck
 
Speaking of which, if Rubberduck VBA becomes an NPO, it should register Rubberduck VBA as a trademark also.
 
Newtonsoft JSON.NET is OSS, right?
© 2018 Newtonsoft
 
"Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it."
Open source != without copyright.
 
2:47 AM
the git history knows who did every single diff, no?
 
@MathieuGuindon Maybe. You can alter it or change authors on prior commits.
 
that OSS.SE answer is suggesting that good governance is to have each contributor's copyright notice in each file. is that for real?
 
My understanding is that if a contributor asserted copyright on a contribution, they would be under the burdon of proving authorship.
I think that's going way overboard. The license reads like this:
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays **an appropriate copyright notice**,
Failed attempt at emphasis is mine.
"appropriate notice" is subject to the legal jurisdiction in which the claim is made.
I don't know about Canadian law, but I believe that in the U.S. a non-revocable trust is considered a legal entity that can assert ownership and managing rights. The easiest way might be to establish a non-revocable, and then transfer copyright to that. The trust could stipulate that its name was "Rubberduck VBA" or something similar, and could basically spell out any rules about maintenance of the copyright that were compatible with the software license and applicable copyright laws.
 
You and Chris could then just be trustees of the Rubberduck VBA Copyright Trust or whatever it was called.
 
2:57 AM
I don't even know what copyright means in this context. when I merged the autocompletion feature, I chose to include that code in Rubberduck as a feature.. from that moment on, sure I wrote that code - but anyone else can now take it, tweak it, and PR it back. In fact that's precisely what I hope will happen at one point or another... as is the case for every other feature.. it's a collaborative effort. The code base as a whole, once compiled, is Rubberduck the product.
 
Drafting a trust is super easy - I've done a couple without a lawyer involved. You basically just have to notarize it and that's it. No reporting, no corporate or foundation registration, nothing.
FSF does manage copyrights.
FML, they're freaking nuts though.
In order to make sure that all of our copyrights can meet the recordkeeping and other requirements of registration, and in order to be able to enforce the GPL most effectively, FSF requires that each author of code incorporated in FSF projects provide a copyright assignment, and, where appropriate, a disclaimer of any work-for-hire ownership claims by the programmer's employer.
 
and do we want to go there?
 
reading it, it feels more like giving the copyright to FSF, rather to the RD VBA contributors
Googling non-recovable trusts get me links about estate planning. Same thing?
 
If "Rubberduck Project Contributors" rather than "Rubberduck VBA" (the org) flies for everyone, I'd rather do that then
 
@this They're mainly used for that because they're cheap, easy, and legally binding. The purpose of the trust is irrelevant to its legal status.
@MathieuGuindon That sounds perfect to me.
 
3:03 AM
I suspect the former will be less hassle; we do have GPL to cover the code itself.
 
Incidentally, regarding anonymous contributors, Canadian law says this:
n the case of a work where the identity of the author is unknown, copyright in the work exists for whichever is the earlier of:

the remainder of the calendar year of the first publication of the work plus 50 years, or
the remainder of the calendar year of the making of the work plus 75 years.
 
and what of bugfix diffs?
 
@Comintern ..... how do we enforce that?!?
 
refactorings?
restructurings?
 
We don't know who did it but we know it wasn't you so we're gonna kick your ass for violating some guy's copyright
 
3:05 AM
@this Presumably by proving the author can't be identified and that the author's work was copyrightable.
 
We don't know specifically who did it but we know it wasn't you so we're gonna kick your ass for violating a Rubberduck contributor's copyright
 
That's exactly what it means.
 
and that's exactly the goal "© Rubberuck VBA" means to achieve
so, "© Rubberduck Project Contributors" is it
 
The bugfix diffs and refactorings generally fall under the category of "derived works". They are copyrightable by the person that performed them to the extent that the derived contribution is significant and attributable to the author.
 
I mostly wonder how you infringe a copyright on a bugfix diff
 
3:09 AM
So, for example, if you refactor something you could assert copyright on the structure, but the the actual code.
 
hey, doesn't GPL cover those?
 
@MathieuGuindon By a horrible quirk of fate?
 
that's the whole point of copyleft - to ensure that all those derived works stay GPL
@MathieuGuindon that also implies that it's the state that prosecutes on the behalf of the unknown victim.
 
A good metaphor of derived work would be if I painted a picture of say, a Campbell's soup can. I would have a copyright on the painting, Campbell's would retain rights to the design of the can.
 
(which is a good thing in that you don't need to drive and look pretty in front of a judge, then hand over a wad of cash to the prettier-looking guy in a pinstripe suit)
 
3:12 AM
@Comintern right - you made a painting, not a can of soup
 
Yep, I refactored the code. I didn't write it.
@this I believe the intent is in the other direction - it prevents somebody else from attacking you with a copyright claim.
 
ok another one: subject A forks the project, clones it, builds it, then implements an inspection and makes a PR, that gets merged. subject A authored that inspection, thus owns the copyright on that code.
 
Wow, scanning back over this discussion it's really obvious that I work amongst lawyers, isn't it.
 
@Comintern I don't follow. The burden of proof lies with the one asserting the copyright. If we're discussing a work from an unknown owner, that owner by very nature cannot be in a position to assert the claim.
 
3:16 AM
@MathieuGuindon Yes. Although the GPL only grants license for them to fork the code and modify it if it remains GPL. That's the point of license attachment.
 
i.e. they don't need to PR it back, but the code needs to be out there
and I'm fine with that
 
@this Right, but it's a defense for a situation where Rubberduck contributors as a whole are, for example, sued by a third party asserting rights. RD doesn't have to trot out the person who wrote it, they can assert in defense of the copyright action that it was an anonymous third party.
 
> RD doesn't have to trot out the person who wrote it
^ that right there
 
@MathieuGuindon Exactly. That's actually the reason that Rubberduck VBA should be trademarked.
That would prevent a fork from calling itself Rubberduck VBA.
 
but then, who owns the trademark?
as in, which legal entity I guess
 
3:22 AM
Anyone can own a trademark.
You just give permission to use it.
 
including a GitHub org?
 
Sure, you draft a legal document stipulating that it can be used in conjunction with the GitHub org's releases.
Remember, if you own a trademark you control how it is asserted.
 
well, FWIW, I saw an interesting model for multnational governance using each country NPO in a federation -- so we would have RD VBA Canada, RD VBA USA, RD VBA Australia, and so forth. Each is registered in their country as a NPO in respective jurisdiction. Those in turn draw up a contract with each other to establish a governance within that organization and transfer of assets.
 
"Rubberduck VBA USA, a Delaware LLC".
 
and boom, it can't be free anymore
or, we gotta sell cookies duckies
 
3:25 AM
And file annual corporate reporting with the registering entity.
That's the main benefit of a trust when the only thing you want to assert is ownership.
 
and does it work in an international setting?
 
> we would have RD VBA Canada, RD VBA USA, RD VBA Australia, and so forth.
on the bright side, as a NPO we'd get reduced shipping costs with Canada Posts ..#swag
 
@this Inasmuch as an individual, yes.
 
I don't think Mat is exactly anxious to go to a board meeting, so....
 
Another option is a foundation, but I believe that in Canada foundation laws are mainly structured toward managing charitable contributions.
Wait, wut? I thought this was the board meeting.
2
It's been going on since around 2014 - SE is taking the minutes.
Doughnuts ran out a long time ago.
 
3:33 AM
lol
 
Reduced postage rates in the States too. Sweet!
 
^ just the trademark
 
Gee
I wonder if there was a GoFundMe, would that get funded.
people like to fund swag for contributors but funding trademark?
 
funding mass-produced swag to sell for funding the trademark(s?) and NPO registrations?
 
i suspect that swag-for-sale would cost more money upfront than registrations.
 
3:43 AM
yup
 
It's about $50 in the US.
 
@MathieuGuindon swag that needs to use the trademark, that isn't registered :-/
 
We're capitalist's here. Don't let my profile picture fool you.
 
@Comintern ok I have to ask - what's the deal with commie guy there?
 
3:44 AM
lol
 
LOL.
Comintern was my MUD\MOO handle back in the 80's and 90's. I picked it because it was pretty much always available.
 
I haven't read the history, but in most places. An unregistered trademark is fine. It's still enforceable, you just need to have clear evidence of the mark in use, and clear evidence of the market segments that it is in.
 
so status quo is fine then
#lost
 
Registration is a step that codifies when your trademark was "commonly known".
 
The entity matters though. Just like that monkey in the selfie couldn't enforce copyright.
 
3:47 AM
Absent registration, you can assert a trademark, but at least in the U.S. you need to show that it is inseparably linked with the mark that it represents.
 
VBA
VBA
VBA
VBA
VBA
VBA
VBA
VBA
ok quick, think "Rubberduck"
VBA?
 
lol
 
@Comintern you're bringing back awful memories of when I had to do this for an old company of mine. I got a registration in Australia, and the US, but it was a PITA.
 
mostly because of US?
 
In connjunction with VBA, Rubberduck has a reasonable unregistered TM claim. RD would lose a claim on TM of Rubberduck in a general context because, well vulcanized rubber representations of water fowl.
 
3:49 AM
(more like, it's a PITA regardless of where you are)
 
You can look and dress like Colonel Sanders, but don't try to sell fried chicken.
 
@MathieuGuindon well, any foreign country would have added to the confusion. It wasn't the fault of USPTO. It was more that it was 2 completely different processes, and sets of terminology etc.
 
"Rubberduck" could be reasonably claimed too IMO
 
I would think so.
 
for software
there's already one on some shady USB hardware I think
 
3:52 AM
@MathieuGuindon Rubberduck debugging is close to having overlap in terms of industry classification
 
@ThunderFrame except it's "Rubber duck debugging"
or "RubberDuck"
but "Rubberduck"?
meh
 
Right. I could start a Rubberduck Italian Restaurant and be in the clear (other than the horrible name for an Italian restaurant).
 
And, given the public nature of this chat, we've already waived client-attorney privilege in any discovery motion. Public chat isn't the best place to discuss?
 
@MathieuGuindon We can cross that bridge when we figure out how to get our hooks in the debugger.
 
I'll start a Rubberduck bathroom furnitures shop just in front of your restaurant
@Comintern LOL
OMG
 
3:54 AM
@ThunderFrame On the contrary - it's the best place for discussing trademark claims. It reinforces them.
 
so searching for "Rubberduck VBA trademark" should point right here now?
 
Judge, I'd like to present for exhibit this printout of 395,394,139 pages transcribing the chat history minutes of board meeting that is continually held and continues to be held even at this moment that conclusively demonstrate that the trademark and copyright has been continually and unfailingly asserted since 2014, the inception of the project!
5
 
LOL
I think you mean the minutes from the board meeting.
 
@this notice the frequent, inconsistent miscapitalization of the term, and occasional substitution of the second U for an I.
 
Thus the claims of multiple trademarks in our action.
 
3:58 AM
Speaking of hands in stuff. The TypeLib offset that gives us the Stream of p-code and source code. We seem interested in grabbing the source code, as to avoid a write to disk, but what if we grabbed the p-code instead? Wouldn't that give us a stream of tokens, and avoid the need to parse source code at all? Sure, we need to understand the p-code, but Wayne hints that that is easy compared to excode.
 
I'm not sure the p-code is aware of things like white-space though, is it?
 
not sure Wayne's "easy" is on the same scale as mine though
@Comintern that's why the VBE nukes it every time
 
@Comintern it must be, it can completely recreate the source, if you remove the source from the binary.
 
Huh.
So it's like it's own pdb file too.
 
private                   foo                    as                       string
 
4:01 AM
@ThunderFrame are you referring to decompiling?
 
Private foo                                      As String
^ that's the VBE being deliberate here
I mean, I don't think the space between foo and As is anywhere in the p-code
 
I have a sneaking suspicion that the reason the increment and decrement operators aren't in the language is because the developers couldn't figure out how to get the VBE to stop turning them into foo + + and foo - -
 
@this decompiling the p-code, not the excode. The p-code decompilation is semi-documented in a GitHub repo. The excode, only Wayne knows. IIUC, MS will let you sign an NDA to read the p-code, as antivirus companies need to inspect the p-code, because the source can literally be anything, and as long as the VBE is the same version/bitness, the VBE will ignore the source and rebuild the code from p-code.
 
hmm. I asked primarily because i'm not sure where the "compiler junk" are at.
but sounds like it's close to where p-code is.
 
4:06 AM
@Comintern but the indenting whitespace, I believe, is maintained by p-code. The excode, you lose whitespace, you lose module-level variable names, and IIUC, you lose calculated constant formulas, and maybe a few other things.
 
we are talking about the fact that we can figure out a variable name and whatnot, right?
 
@this ?
 
That's the same as symbol files IIR.
 
Wayne provided an example here: everythingaccess.com/mdeprotector_example.htm
 
@ThunderFrame hmm so it would be some kind of NOP word with the number of spaces??
 
4:08 AM
@this the p-code is what a line gets converted to as soon as you enter it, the VBE then converts that p-code back to a pretty-printed line (hence losing the whitespace that Mat showed)
 
I've always thought of it more as a token re-writer.
 
So the p-code is a one-for-one representation of the code, but as identifiers, opcode and tokens.
 
so the "p" in the "p-code" stands for pretty code? Gotcha
 
In theory, antlr could emit pcode.
 
;-P
 
4:09 AM
@ThunderFrame and the editor makes it red if it doesn't know what to do with it
 
I've dabbled with the GitHub project, but it's effectively a god procedure, and it's python. I got an understanding of the layout though. Symbol tables, references, opcodes etc.
 
The editor apparently does whatever the hell it pleases.
 
@MathieuGuindon yep, or transparent if you use destructive force and use a reserved word and blow up the VBE!
 
4:12 AM
i wonder if reading p-code would make it easier to parse stupid enum names.
 
I'm not suggesting p-code analysis as a short-term solution. Just saying it's already a tokenized representation of the code, complete with identifiers etc. It would be faster than parsing/resolving.
@this that's the only way to parse unparsable source code.
 
@ThunderFrame hmm not sure we get to avoid not resolving?
 
@this Probably not, and the enum names should work now.
 
@this well, some of the resolving
 
I imagine it's more like that ^^^.
 
4:17 AM
@Comintern nope, parser error for this:
Public Enum Foo = 42 : Bar = 21 : End Enum
    Foo = 42
    Bar = 21
End Enum
the pretty printer removes the brackets so RD can't possibly know there's supposed to be brackets there.
 
That's a PDF file, and it contains enough information to assert any debugger that can read it as the appropriate symbol.
@this Ahhh.... ThunderCode.
2
 
:-)
 
My guess is that the p-code wouldn't have that either - it would only store the abstract symbol with whatever the "canonical" representation was. That may be the reason that the brackets disappear - the symbol table doesn't know to store them, but it can differentiate them because they have different entries in the symbol table.
 
This is also fun code, courtesy of Mr. ThunderFrame:
Private My Variable As String

Public Sub Test()
    Call My Variable
End Sub

Debug.Print My Variable

Public Sub My Variable()
    With My Variable
        Debug.Print My Variable
    End With
End Sub
 
4:23 AM
this compiles and run.
 
I know, just not how. it's like ...magic.
 
O_O
That's some serious voodoo sh!t.
 
non-breaking spaces I get
but that Debug.Print beats me
and ...no, I don't get any of it, that Private field shatters everything
unless one has one nbsp and the other has two, or something like that
put it up on puzzling.se
 
Note to self: Replace the \s expressions in the indenter Regex's with \x20.
 
given this code in Module3:
Option Explicit

Public Sub Foo()
    Debug.Print "Hello World"
End Sub
The p-code is the non-selected area, and the selected area is the compressed source:
sure, it looks like more p-code than source, but that p-code section contains lots of metadata
 
4:31 AM
So you could literally put whatever the hell you want in as the compressed source?
 
note the symbol table toward the end of the p-code block
@Comintern yep - it doesn't even need to be compressed
'Nothing to see here - All your codez are belong to us
 
Everyone is doing their source code obfuscators wrong.
 
@ThunderFrame out of curiosity - why are there apparently random dots in the words? (like Debu.g and W.orld?
 
"Why am I getting a macro warning? This project contains no code..."
 
4:33 AM
> It is surprising that malware authors are not using this trick more widely. pcodedmp.py - A VBA p-code disassembler
 
> You've been rubberducked
gosh no, now that looks like a malware that nukes your VBA code
 
@ThunderFrame IKR?
 
@MathieuGuindon RD Inspection: Your code is not what you think it is.
 
I'm going to start posting stuff like this on SO [vba] questions:
 
4:35 AM
well, it never is, is it
 
'Do this:






'Done.
 
' step 1:



'step 2:



'...





'...profit.
 
hmmm interesting...
>

Office 2016 64-bit only: When disassembling variables declared as being of custom type (e.g., Dim SomeVar As SomeType), the type (As SomeType) is not disassembled.

Office 2016 64-bit only: The Private property of Sub, Function and Property declarations is not disassembled.

Office 2016 64-bit only: The Declare part of external function declarations (e.g., Private Declare PtrSafe Function SomeFunc Lib "SomeLib" Alias "SomeName" () As Long) is not disassembled.
wonder if that also means they plugged the immediate hole there....
 
ha, feels like it
 
@this that's the compression at work
 
4:37 AM
^^^ Triggers inspection "Consider renaming variable ''"
 
nah, the author says he doesn't have 2016 64-bit.
Probably just need to deal with boundary alignment
 
@this I can't imagine that would be horribly difficult - just compile the same source in both 32 and 64 bit and examine the boundaries.
@MathieuGuindon night
 
night,mat
@Comintern well, no, but you kind of need an access to the 64-bit Office, no?
or he doesn't have enough friends running Office 2016 64-bit. :p
 
Sure, but we apparently have 38 contributors in the last year so that can't be hard.
I'd just spin out another VM.
 
4:40 AM
yeah
 
Is it just me, or is GitHub slow as hell tonight?
 
despite 32-bit being more prevalent, we really ought to test under 64-bit more. It has extra functions, types, typehints and TypeDefs, that won't otherwise get tested.
ok, so pluralizing that made the differences sound greater than they actually are.
 
I'm running it now, as evidenced by my :facepalm: issue...
My Python is sketchy, but I might be able to port that. Lots of delegates.
This always slays me: from __future__ import
 
@Comintern needs an OOP rewrite, iirc
 
Yeah, but my general rule is that once it works in the target language, it's easy (easier) to refactor.
I'm amazed at how tightly coupled it is to the type info.
# The following idiocy is because Microsoft can't stick
# to their own format specification
 
5:00 AM
@Comintern the binary TLB or the TLB composition?
 
The composition.
I guess it makes sense though, in that the vtables need to build based on the type description.
LOL - I like how the base element of the token table is <crash>.
VB_Invoke_PropertyPut? Do the VBA tlbs support DispId.PropertyPut?
Their offset is wrong in this commented code.
# argTypeName = getName(indirectTable, identifiers, argType + 6, endian, vbaVer, is64bit)
I might need to PR back into this.
 
5:51 AM
I think I have the breaking edits down to 2 files. Hopefully I can figure it out with sleep and a clear head tomorrow.
Night pond.
 
6:29 AM
All the best for the wedding ahead @M.Doerner
 
Umm...@MathieuGuindonis this proposal caters for the under the bus worst case?
 
Nvm I understand the trademark assert. Just proving the evidence, gotcha.
 
 
4 hours later…
10:50 AM
@this do you remember Wayne saying something about Enums being kept somewhere other than in the module/class module? Where does the TypeLib keep them? At the globals level?
 
Jan 19 at 16:38, by WaynePhillipsEA
enums and UDTs are not currently enumerable either. if you get a member that references an enum/UDT you'll be able get the enum/UDT TypeInfo, but you just can't find the TypeInfo diretly by enumerating the TypeLib
 
My chat search foo is clearly not as strong as yours
 
I noticed that you have to type in the username just at right speed. Too slow, they get all wrong Waynes and won't let you select the right Wayne. If you don't let it select, it will also select the wrong Wayne.
 
11:35 AM
@this IKR, the time of day seems to make a difference too. But the search terms seem to be order of use specific. Which makes it hard.
 
11:58 AM
Our own internal training website won't work with it, and yet corporate IT insists on making IE (not even Edge) the default browser on everyone's machine. Every time I reboot the default browser gets reset by policy.
 
12:21 PM
@ThunderFrame The TypeLib keeps them at the same organization level as a module or interface. TYPEKIND.TKIND_ENUM
Same as structs.
 
@Comintern I see - I can't seem to find evidence of them in the p-code - might need to do some more testing.
well, not at the module level in which they're declared
@FreeMan I used to work somewhere where they paid for a Netscape license, and then had the audacity to make us use it!
 
I'd guess they'd only link into the symbol table for the enumeration. Pretty sure that enums always have project scope too.
 
@Comintern As Wayne mentioned in next line, we can find them but only via a reference from other TypeInfo.
I wonder if the enumerations and constants that aren't referenced/used are simply dropped out of the compilation.
 
It wouldn't be able to recreate the source then.
 
True.
 
12:29 PM
yeah, next spot to look is in the project stream - I suspect they'll be there.
 
Constants can go anywhere in a TypeLib apparently. IIR even the ones in the reference projects we serialize for tests have different organization patterns.
 
@Comintern yes but recall from few days ago, they don't need to come up.
a const compiled in a body of interface just won't exist after the compilation.
 
True. I think the COM spec has slightly stricter rules than the MIDL spec.
 
also when tweaking OleWoo, I observed that the typedef have to be defined in a certain way. Otherwise, OB won't display constants correctly.
you can see it in the Scripting type library - their constants are borked up with names like MIDL_......
 
I think I'm ultimately going to have to put a bounty on this one:
1
Q: How does VBA/VB6 layout the memory of a class that implements several interfaces?

ThunderFrameI'm exploring the layout of fields and pointers for a class instance, in VBA. I assume that the layout is similar if not the same for VB6. I've been able to use various bits and pieces from this VBForums thread to help find the public and private members of the class, but I'm unsure how to determ...

 
12:44 PM
@this I ran into something odd with typedefs in the VBE lib too- they apparently don't need to declare a GUID either. LONG_PTR stores its GUID in a custom attribute instead.
 
hmm. can a typedef have a guid?
I assumed the GUID in the custom was just a key to get to the custom data, no more.
MIDL specs doesn't list uuid as one of its valid attributes for the typedef
 
Yes. The ones in mso and stdole do IIR.
In the actual TypeLib it's included on the structure for all top level elements.
 
yes but uuid ≠ custom's key
 
Ah, I follow now.
 
FWIW, we have them generated in our IDL, too and I don't specify them at all
 
12:51 PM
I understand the MIDL spec to mean that custom can be anything the declaring type wants it to be.
 
yeah and it'd be only useful to the consumers that understand what to do with it.
in our case, we get some attributes useful for COM interop, IINM.
 
> FWIW, the list of characters that may immediately follow `Rem` and *still* be considered a comment by the VBE are:

> Any ASCII character with a code between 0 and 127, **except**:
> - `0`-`9`
> - `A`-`Z`
>- `_` an underscore
> - `a`-`z`

In CP1252, `Rem` is not treated as a comment when followed by any character with a code between 128 and 255.

If anybody ever needs the regex to find comments in a codepane (regardless of the spec), this should do it:

`('|Rem[\x01-\x08\x0B-\x0C\
 
Right. Or internal consumption by the declaring library.
 
yeah
 
@Duga I'll need to add that in the indenter.
 
12:53 PM
@Comintern I'd forgotten about comment arrays: Rem(1 To 500)
 
in this situation:
[
  uuid(E07C841C-43F0-3B33-B105-9B8188A6F040),
  version(2.2),
  helpstring("Rubberduck AddIn"),
  custom(DE77BA64-517C-11D1-A2DA-0000F8773CE9, 134283886),
  custom(DE77BA63-517C-11D1-A2DA-0000F8773CE9, 2147483647),
  custom(DE77BA65-517C-11D1-A2DA-0000F8773CE9, "Created by MIDL version 8.01.0622 at Mon Jan 18 21:14:07 2038
"),
  custom(90883F05-3D28-11D2-8F17-00A0C9A6186D, "Rubberduck, Version=2.2.6772.40445, Culture=neutral, PublicKeyToken=null")

]
library Rubberduck
the first 3 came from MIDL itself. The last one came from .NET.
oh, hai, Rubberduck from 2038!
 

« first day (1505 days earlier)      last day (1675 days later) »