« first day (1415 days earlier)      last day (1765 days later) » 

12:01 AM
@this For DWORD WINAPI GetCurrentDirectory what does WINAPI signify? msdn.microsoft.com/en-us/library/windows/desktop/… says "The calling convention for system functions." and it's declared in WinDef.h by #define WINAPI __stdcall.
I'm trying to answer it my self. I found docs.microsoft.com/en-us/cpp/cpp/stdcall but I'm again in territory that's beyond my current comprehension.
 
12:57 AM
@IvenBach That's more than I've done.
Well, I've done it a little bit, but mostly I just use the .NET Framework.
 
 
2 hours later…
2:35 AM
@Hosch250 These things I've wanted to do for so long.
I still find it hard to believe that I'm actually doing them. More than that I'm understanding what it is and why.
2
@this :+1: I got my RD working with the VBE again.
 
Now you just need to learn how to write these things in C :P
 
C# first then C++ then C.
 
2:54 AM
Powershell for me then C# I just feel I could learn framework better this way especially shared by others.
Hence was good to find search-Registry script that fits a good purpose in the long run
 
 
3 hours later…
5:51 AM
Night pond.
 
6:49 AM
@IvenBach Soooooo..... as I am desperate to learn more VBA I was trawling through that Windows API guide link you referenced and ByRef literally means "By Reference." That "reference" is in reality a 32-bit pointer - I guess that holds for 64 bit machines - still 32-bit pointer?
I wish I had done CS. Reading these articles I have too many questions.....
 
 
1 hour later…
8:02 AM
@QHarr No, it varies with the machine/OS. So a pointer on a 64-bit machine will be 64-bit long, and a pointer on a 16-bit machine will be 16-bit long.In old days of VBA5 it was common to use Integer for pointers for 16-bit API but then when VBA6 and 32-bit Windows came, it was updated to use Long for the pointers. But in reality that was not a great idea because a true pointer data type should not be fixed in size. In C-family languages any type* data type already scale up/down...
... and one must use the sizeof() to get the size of things, including the pointer at the runtime. That's why it wasn't until VBA7 (e.g. Office 2010) we got a true pointer data type LongPtr, which converts into Long for 32-bit systems or into LongLong for 64-bit systems.
@IvenBach It's hard because in VBA, we never have to think about the calling conventions, which is pretty low-level. The issue is that without a calling convention, you don't know who owns what and who has to clean up. So if we have a function that takes 2 parameters and returns something... who's going to deallocate the parameters and the return? Should it be the caller? Or the callee? And how do the callee know where to retrieve the parameters?
At that level, the function is nothing more than a pointer to a region of memory with some machine instructions to do something. The instructions only know about the registers and memory addresses (oversimplyfing a bit here). Therefore, you must be able to describe how the parameters will arrive to the function -- by storing it in the stack, and in what order, so that when callee runs the machine instruction it can do the right thing in reading the inputs and creating outputs.
 
8:19 AM
@this Thank you. That is logical. Additional question: why is it on 64 bit I still make Win32 calls? (Or am I mis-remembering #made up word)
 
because how they transitioned from 16-bit to 32-bit was different than how they transitioned from 32-bit to 64-bit.
 
ok
 
in 16/32, we basically moved everything over... for example, from system to system32
and made a separate copy of all DLLs, separate path, blah blah
so for that reason, we refer to system DLLs in the system32 as "Win32".
 
m'kay
 
but on 64-bit system, there is no system64
instead, we now have system32 to store 64-bit system DLLs.
 
8:23 AM
ahhh
 
and we put all original 32-bit system DLLs into SysWOW64
 
@this not at all confusing ;-)
 
Why? So that 32-bit apps can run on 64-bit OS.
 
Ahhh..gotcha. You answered my confusion!
 
I kinda of missed the 16/32 transition but I think it wasn't as seamless as the 32/64 transition. IIRC, you could only work in one or other mode.
so that's why we still use "win32" even for 64-bit systems.
 
8:27 AM
Thank you very much
 
In case you don't know already - WOW64 in the SysWOW64 expands to Windows on Windows 64. But yeah, not exactly the bestest name.
 
I didn't know. Consider me learnt!
 
 
1 hour later…
9:50 AM
> Closes #3921

I made some changes to the `RegisterAddIn()` function and in testing, the bug that was previously observed no longer exhibits and I am able to install as an admin and thus register the IDE for myself. However, I would appreciate others testing to verify it's not "just my computer" symptoms.

Pending: Update the messaging around admin not being able to register as they should no longer apply. Will remove after tests.
 
10:04 AM
[rubberduck-vba/Rubberduck] build for commit a1c87499 on unknown branch: AppVeyor build succeeded
[rubberduck-vba/Rubberduck] build for commit a1c87499 on unknown branch: 57.64% (target 0%)
 
@Duga worked for me @this, thanks.
 
10:30 AM
@WaynePhillipsEA Thanks for the confirmation! Will see if I can get few more from others.
 
 
1 hour later…
11:42 AM
@M.Doerner what would be the correct way to cause a resolver error state? Throwing exception nor returning resolution failed expression works?
^ "works?" should read "doesn't work?"
 
> See #3935#discussion_r182843138

Currently, the Office8 CommandBarButton wrapper (as used by VB6) has a chained COM reference on its base constructor call. This will be leaking RCWs. We need to wrap the events interface and add it to IVBE so that the event source can be obtained without chaining.
> Currently, parsing a VBForm causes an exception here: https://github.com/rubberduck-vba/Rubberduck/blob/14743dc32ef02938b569b841fe94e8d250217b72/Rubberduck.Core/Navigation/CodeExplorer/CodeExplorerComponentViewModel.cs#L44

as the declaration type for VBForms is not in the dictionary. We should identify the missing declaration types and create icons for them. It may be worthwhile to have a default too (or at least guarding with ContainsKey), to avoid blowing up CE if anything unexpected is f
 
12:39 PM
> See https://github.com/rubberduck-vba/Rubberduck/pull/3935#discussion_r181759991

Currently, parsing an empty VBForm fails with Unexpected Error. This is caused by two null reference exceptions:

https://github.com/rubberduck-vba/Rubberduck/blob/14743dc32ef02938b569b841fe94e8d250217b72/Rubberduck.Parsing/Symbols/Declaration.cs#L578

![image](https://user-images.githubusercontent.com/25420409/39084205-4da1b54a-4569-11e8-96e6-ae43e6908305.png)

https://github.com/rubberduck-vba/Rubberduc
 
So, I set up a unit test to test the parameter not used inspection. It reported that value parameter wasn't used if I had a Debug.Print value. But if I change to MsgBox(value), then test passes. Is that because we special case Debug.Print or is there something fundamentally wrong here?
 
> # [Codecov](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/3893?src=pr&el=h1) Report
> Merging [#3893](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/3893?src=pr&el=desc) into [next](https://codecov.io/gh/rubberduck-vba/Rubberduck/commit/14743dc32ef02938b569b841fe94e8d250217b72?src=pr&el=desc) will **decrease** coverage by `0.21%`.
> The diff coverage is `100%`.


```diff
@@ Coverage Diff @@
## next #3893 +/- ##
=========================
 
@Duga I don't get it. I add more unit tests and it decrease coverage? Whatever....
@M.Doerner in regards to my prior question - I think I figured it out - resolving references is done outside the try/catch that will set the module states so I made the part that resolves reference have a similar try/catch. However in doing so, it now violates the assumption made with a Debug.Assert which I commented out ATM. See if that is OK or not.
 
12:58 PM
> ![image](https://user-images.githubusercontent.com/25420409/39084288-3cb48ada-456b-11e8-94b1-a431cafc9ed0.png)

This is due to neither of the options from the VBA CommandBarButton.ApplyIcon method being appropriate for VB6:

- Setting .Picture property is not possible, as the Office8 library does not have this property
- Using PasteFace (often suggested on older web pages) fails randomly, sometimes throwing, sometimes silently doing nothing. Even were it reliable, it has the effect of dum
[rubberduck-vba/Rubberduck] build for commit 725c9361 on unknown branch: AppVeyor build succeeded
> # [Codecov](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/3893?src=pr&el=h1) Report
> Merging [#3893](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/3893?src=pr&el=desc) into [next](https://codecov.io/gh/rubberduck-vba/Rubberduck/commit/14743dc32ef02938b569b841fe94e8d250217b72?src=pr&el=desc) will **increase** coverage by `0.05%`.
> The diff coverage is `100%`.


```diff
@@ Coverage Diff @@
## next #3893 +/- ##
=========================
[rubberduck-vba/Rubberduck] build for commit 725c9361 on unknown branch: 57.69% (target 0%)
 
@Duga that's all I got for VB6 known issues for now :-)
 
@mansellan I'm curious. Can you qualify the built-in functions to VB using VB.<builtin functions> ?
 
@this Not sure I follow, sorry?
 
Ok - you know how we have stuff like MsgBox, Left, Right
In VBA, you can do VBA.Msgbox, VBA.Left, or VBA.Right
 
1:12 PM
ah ok
checking
 
or more explicitly, VBA.Interaction.MsgBox, VBA.Strings.Left ...
I simply don't know if VB6 has the same thing going on.
 
yep you can - and indeed the OB shows it being exactly that VBA.Interaction.MsgBox
not VB
 
..... that's kind of weird.
is VB6 really using VBA?
 
yep. Empty project has refs for:
Visual Basic for Applications
 
and you can't unreference that?
 
1:18 PM
Can't remove project or reference, in use
(empty .Exe project)
 
just one more thing to check
check the Reference's full path
something like ?References(1).FullPath (don't know if VB6 has equivalent)
 
I can see it in the refs dialog - C:\Windows\SysWOW64\msvbvm60.dll
 
right it makes sense now
 
Hmm, sounds like VB6, but has types in VBA "namespace"?
compat thing?
 
I remember noticing both the msvbvm60.dll and vba.dll had same functions
yes, I think so.
though, that's not VB6.OLB.
 
1:21 PM
no...
But that's reffed too
 
so what does OB call it?
 
as "Visual Basic objects and procedures"
 
i meant the programmatic name
as shown in the OB's library dropdown
 
ah yes, that is "VB"
 
ok, so I guess for common functions like MsgBox and Left, we still get them from the VBA namespace
 
1:23 PM
i sec will up a scrrenshot
 
but what are exclusively VB, I guess they must be in a separate namespace, presumably VB.
Soooo.... using that logic - if you can find a function defined in there, and you can fully qualify as VB.<some function>
 
and if that compiles/run, then that's how we need to provide the name for MemberName/IdentifierName - may have to be a special case since we obviously don't get it for some reason.
says "Image not found"
 
gah
which image bucket is good for SE?
 
well, don't bother.
what you can do is paste the image in GH issue
(don't need to actually create issue)
 
1:26 PM
oh ok
 
once uploaded, you'll get a URL, copy and paste it here.
 
right, so can you VB.Load then?
 
i guess the fully qualified name would be VB.Global.LoadPicture
but VB.LoadPicture should also work, too
 
1:29 PM
VB.LoadPicture ""

VB.Global.LoadPicture ""
compiles fine
 
yeah, so I think the VB6.OLB should have name of VB
 
yep
 
either a bug in our type lib collector or it truly isn't there and we may have to special case.
 
ah ok
 
i think former is more likely. can't imagine how it would be broken for us and yet work for VB6, since OB can see the name of the library and everything
 
1:33 PM
yeah... IIUC (unlikely) I don't think its the whole reference collection that's broken for VB6.OLB, as it gets quite far into the process. But it chokes on _PictureBox - could there be something funky on that type?
 
who owns that type?
 
the underscorce indicates hidden right?
 
looks like VB6.OLB (VB) does
well yeah but more likely - it's the correct thing
because under the hood, we all work with interfaces
 
@this yes
 
PictureBox is most likely the coclass, using _PictureBox as its default interface
 
1:35 PM
checking
hmm ignore what I said about getting far into the process - first type in the lib...
would it help if I checked VB6.OLB into /libs?
 
GQ, IDK. HAO.
:p
HAO = Have to ask others
 
lol
got the other two!
was googling that one :-)
 
pretty sure doesn't exist. I made itup
gtg
 
2:13 PM
@MathieuGuindon is it worth adding the VB6 issues to a new project?
 
@M.Doerner I ran a couple of non-trivial VBForms through the parser (temporarily avoiding the other issues raised) - looks like the grammar changes for attributes have worked.
 
 
1 hour later…
3:43 PM
@QHarr glad someone else is getting benefit too. I feel like I’m hogging the pond for my personal use way ore than I should.
 
@IvenBach @this's explanation of pointers and allocations above helped me too. Never done anything lower-level than C#, so whilst I know roughly what's going on nearer the metal, it's great to get expertise from someone experienced.
I'm pretty spoiled by all the type-safety in c#, and the GC
 
> There is a report from #3922 where an exception was thrown because a project already had a conflicting project ID.

This is strange because normally it should not be possible to have collisions since we already have a check in place to guarantee that all `ProjectId`s are unique and update a project's `HelpFile` property if necessary.

Here is the log from the original issue:
```
2018-04-11 10:38:35.5505;FATAL-;Rubberduck._Extension;Startup sequence threw an unexpected exception.;System
> Since this issue has 2 separate problems, one which is going to be addressed by upcoming PR #3948 and another not related to installer, I'm opening a separate issue and closing this issue.
 
@this What's a coclass?
@mansellan To me it should be a default assumption that if you're working with something you'll know as much as is reasonable about it.
I just don't like the blind leading the blind...
 
4:06 PM
Note though that section 6 relates to COM references being made directly in VS (which implicitly calls TlbImp to create an interop assembly). For RD we didn't do this - we used interop assemblies created explicitly, either supplied directly by MS (known as primary interop assemblies due to their being published by the owner of the COM library) or created by using TlbImp directly on the command line (I had to do this for Office8 and VB6, neither of which have PIAs).
 
 
4 hours later…
7:58 PM
I'm reviewing #3937 since it seemed similar enough to the PR I'm doing so thought it worthwhile to check in case it was related. I already verified that my fix in the PR was not sufficient since as noted, it is likely that only user-defined declarations get resolved, not the built-in declarations. That said, I'm having hard time figuring out when ColumnIndex gets visited. Is there a simple way of attaching a breakpoint for a particular token without figuring which point in parsing it is hit?
 

« first day (1415 days earlier)      last day (1765 days later) »