@IvenBach Thanks! I've been using Dir for a long time but I've transitioned to FSO in 95% of situations to take advantage of all the wonderful file attributes. As I've griped about in this channel, the 5% is because FSO isn't able to use wildcards when you'd most want to.
Private Declare PtrSafe Function GetCurrentDirectory _
Lib "kernel32" Alias "GetCurrentDirectoryA" ( _
ByVal nBufferLength As Long, _
ByVal lpBuffer As String _
) As Long
Public Sub TestIt()
Dim s As String
Dim l As Long
'Get the length of the buffer
l = GetCurrentDirectory(0, vbNullString)
'Allocate the buffer
s = Space$(l)
'Get the buffer itself
If GetCurrentDirectory(l, s) Then
Debug.Print s
End If
End Sub
If I remember correctly, what VBA usually does when passing a string ByVal, is to copy the string to a new memory location and then passing the pointer to the start of the string. That would make no sense here, indeed.
the parsing process rewrite also didn't touch the parser itself. The grammar update was highly contained in nature. The regex assistant is basically completely independent of VBA. ...
> <irony>If you are a developer, who has been taught Java and C# and forced to work with VBA, most probably somewhere at this point you realize that VBA is not a funny scripting language.</irony>
@this Looking up how strings actually work in VBA here, only one question remains for me: why don't we get problems passing in a BSTR into an LPSTR parameter.
> # [Codecov](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/3934?src=pr&el=h1) Report > Merging [#3934](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/3934?src=pr&el=desc) into [next](https://codecov.io/gh/rubberduck-vba/Rubberduck/commit/1a53957d2f1fe7590813d6294f213a5a8873858e?src=pr&el=desc) will **decrease** coverage by `0.01%`. > The diff coverage is `87.16%`.
> # [Codecov](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/3934?src=pr&el=h1) Report > Merging [#3934](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/3934?src=pr&el=desc) into [next](https://codecov.io/gh/rubberduck-vba/Rubberduck/commit/1a53957d2f1fe7590813d6294f213a5a8873858e?src=pr&el=desc) will **decrease** coverage by `0.03%`. > The diff coverage is `68.84%`.
#TIL runtime callable wrappers are like toxic waste. You want them very well wrapped, such that they never, ever leak. And even then, handle them with extreme caution.
oh, wait... this already has a wrapper, its not not linked to a property
phew!
question: VB controls have no Name property, but they do have an entry in their Properties collection with a key of "Name". That should always exist, but what should be done if not? I'm thinking return null on the getter, but on the setter???
throw? silently do nothing? try and add one? if the latter, what if that fails?
actually, last one is not an option - collection is read-only
ima leave it as no-op for now, with a comment. should never happen (famous last words...)
> French.UninstallOldVersionPrompt=Il semble y avoir une version antérieure de Rubberduck installée sur ce système pour %s, qui devra d'abord être désinstallée. Procéder à la désinstallation?
> # [Codecov](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/3935?src=pr&el=h1) Report > Merging [#3935](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/3935?src=pr&el=desc) into [next](https://codecov.io/gh/rubberduck-vba/Rubberduck/commit/a7475d76599d20e5acfeb332c39aa8135d0ba45f?src=pr&el=desc) will **increase** coverage by `0.03%`. > The diff coverage is `0%`.
> # [Codecov](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/3935?src=pr&el=h1) Report > Merging [#3935](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/3935?src=pr&el=desc) into [next](https://codecov.io/gh/rubberduck-vba/Rubberduck/commit/a7475d76599d20e5acfeb332c39aa8135d0ba45f?src=pr&el=desc) will **increase** coverage by `0.03%`. > The diff coverage is `0%`.
> # [Codecov](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/3935?src=pr&el=h1) Report > Merging [#3935](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/3935?src=pr&el=desc) into [next](https://codecov.io/gh/rubberduck-vba/Rubberduck/commit/a7475d76599d20e5acfeb332c39aa8135d0ba45f?src=pr&el=desc) will **increase** coverage by `0.03%`. > The diff coverage is `0%`.