« first day (1418 days earlier)      last day (1762 days later) » 

12:00 AM
RELOAD!
[banane-io/PDB] 1 commit. 91 additions. 12 deletions.
[rubberduck-vba/Rubberduck] 16 commits. 1 opened issue. 2 closed issues. 13 issue comments. 20305 additions. 3794 deletions.
 
12:15 AM
@MathieuGuindon will it be possible to have alerts to unused references in VBA through RD like there is in VS? If the Scritping library is referenced but not actually being used it’ll alert to possibly remove.
 
1:03 AM
There's this popular idea among developers that when you face a problem with code, you should get out a rubber duck and explain, to the duck, exactly how your code was supposed to work. https://www.joelonsoftware.com/2018/04/23/strange-and-maddening-rules/
 
1:32 AM
@IvenBach absolutely!
I actually want that as part of the add/remove references dialog... which I desperately need to get back to
 
 
1 hour later…
2:47 AM
> # [Codecov](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/3956?src=pr&el=h1) Report
> Merging [#3956](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/3956?src=pr&el=desc) into [next](https://codecov.io/gh/rubberduck-vba/Rubberduck/commit/14743dc32ef02938b569b841fe94e8d250217b72?src=pr&el=desc) will **decrease** coverage by `0.08%`.
> The diff coverage is `1.37%`.


```diff
@@ Coverage Diff @@
## next #3956 +/- ##
========================
 
@Duga sooo glad I got unit tests set up for this. Thanks @Vogel612/@M.Doerner! Note: I cheated a bit and didn't MT, but left a comment to kindly not to do it in production. ;)
 
3:00 AM
[rubberduck-vba/Rubberduck] build for commit 93e146dd on unknown branch: AppVeyor build succeeded
> # [Codecov](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/3956?src=pr&el=h1) Report
> Merging [#3956](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/3956?src=pr&el=desc) into [next](https://codecov.io/gh/rubberduck-vba/Rubberduck/commit/14743dc32ef02938b569b841fe94e8d250217b72?src=pr&el=desc) will **decrease** coverage by `0.01%`.
> The diff coverage is `13.68%`.


```diff
@@ Coverage Diff @@
## next #3956 +/- ##
=======================
[rubberduck-vba/Rubberduck] build for commit 93e146dd on unknown branch: 57.63% (target 0%)
 
 
1 hour later…
4:04 AM
@TweetingDuck @MathieuGuindon You should ping Joel and let him know about our ducky.
 
@IvenBach he knows... I'm sure he knows
he's been pinged about RD before, I mean ;-)
 
Has he ever responded though? :p
 
I gotta get off my duff and fix that about window...
 
4:19 AM
:+1:
 
4:45 AM
I wonder what demonstration of RD that Joel need to “blows his socks off”...I’m dreaming...:)
 
I guess I need to active that CamTasia license, and put that YouTube channel to use
...but first, sleep!
'night!
 
posted on April 24, 2018 by Rubberduck VBA

Creating objects is something we do all the time. When we Set foo = New Something, we create a new instance of the Something class and assign that object reference to the foo variable, which would have been declared locally with Dim foo As Something. With New Often, you wish to instantiate Something with initial values for its properties… Continue reading Factories: Parameterized Object&#

 
5:09 AM
Factories: Parameterized Object Initialization https://rubberduckvba.wordpress.com/2018/04/24/factories-parameterized-object-initialization/
 
> Our general rule is that if the correct length of an answer is a whole book you are asking too much. These questions feel like showing up
I do that too often...
 
 
2 hours later…
7:05 AM
IIRC, the synchronise attribute stuff has been removed/deactivated because of the issue of synching up the tokens. Could we maybe, as a first step, revive it for the module attributes?
The module attributes to not need synching up of contexts and it would help very much for setting the predeclared attribute.
 
7:24 AM
Anyone any good with command line and VBA?
I have a vba script which correctly prints out a variable's value in the command prompt window but returns the variable string rather than it's value to immediate window i.e. echo %newest% returns "Test1.csv" in command prompt window but returns %newest% to immediate window. I am retrieving with CreateObject("wscript.shell").exec("cmd /c cd C:\Users\User\Desktop\Testfolder && (for /f ""eol=: delims="" %F in ('dir /b /od *.csv') do @set ""newest=%F"" ) && echo %%newest%%").StdOut.ReadAll
 
7:37 AM
> Background: the IVBETypeInfo interface IID changed between VB6 and VBA, which means ExecuteCode/unit tests weren't working with the new VB6 support.

This PR completely removes the dependency on the IVBETypeInfo interface, moving the GetStdModAccessor member over to the IVBEComponent interface (which hasn't changed since at least the VB6 days), where it is implemented as well.
[rubberduck-vba/Rubberduck] build for commit 2db03306 on unknown branch: AppVeyor build failed
BUILD FAILURE!
> closes #3953
 
7:56 AM
@M.Doerner the Not operator is unary too. Even when used as a dual operator, it is effectively unary as the RHS is ignored IIRC
 
[rubberduck-vba/Rubberduck] build for commit a7928213 on unknown branch: AppVeyor build succeeded
[rubberduck-vba/Rubberduck] build for commit a7928213 on unknown branch: 57.67% (target 0%)
 
e.g. 'Not 50' yields -51... as does '50 Not 12345678'
 
8:13 AM
But Not is listed as logical operator. Those have their own rules for the declared type of the return value.
Btw, there are no 'Byte` literals. So, Not 50 is bitwise negation of the Integer 50.
 
It's not implemented as a logical operator
?TypeName(Not CByte(50))
 
To anyone of the VB6 users, does the VB6 editor convert input text like the VBE, i.e. does it strip whitespace and convert date literals into US format?
 
The Not operator being implemented as a bitwise operator is one reason why you should never use Boolean to represent the BOOL return value in API calls. If you do, you end up with a Boolean that is stuffed with a 1 value rather than the usual -1 value, and this comes apparent when you later use the Not operator on that Boolean, which evaluates to -2 rather than zero, so doesn't act like you expect.
@M.Doerner dates do get put into US format.
 
8:51 AM
Thanks
That makes evaluating date literals easier.
 
np. remind me... what's the whitespace thing
 
The VBE strips whitespace at the end of non-empty lines and between a function name and the opening parenthesis.
 
I'll double check, but I'm sure it does
 
There is more, but I do not remember everything.
It presents what it thinks the p-code it derived corresponds to.
 
checked... same as VBA
 
8:54 AM
That prevents a few headaches on our side.
Small parts if the grammar depend on it to disambiguate things.
 
sure, makes sense
similar to the assumption that code compiles
actually, that's another thing we need to sort for VB6... the 'compile before parse' option. I think @this might need update his runtime registry setting
 
9:54 AM
Hi, I have posted my earlier command line vba query to SO here if anyone is able to answer please.
 
10:33 AM
> The change seems good since we already require a standard module (e.g. `IVBComponent`) anyway.

Just to confirm - if we lose the `IVBETypeInfo` do we lose any extra metadata we wouldn't have had via the normal `ITypeInfo`?
 
@WaynePhillipsEA I think I'm missing something here. This is a RD's setting and it should be working anywhere. Are you saying it's not working?
@M.Doerner I don't think we need attributes for that. We can just read the typelib via the typelib API and get all the attributes that way.
That also means you do not have to synchronize anything - you only need to check it again if you think it might have been changed. Since it requires UI thread, you'll want to cache the results, however.
 
@this sorry I meant the registry check that you make to ensure that Compile On Demand is off. I think the registry path will need adjustment
 
10:48 AM
oh that makes sense. so the path is different, I assume?
 
> No we don't lose anything. IVBETypeInfo was just being used for the GetStdModAccessor member, which I've now located on IVBEComponent. There shouldn't be any side effects.
> Re-opening this now that we have VB6 support where this makes sense.

I will add the necessary registry key. However, I do not think I can set it as command safe line because we by default display a splash screen and when something goes wrong, it will pop open a dialog which will block until user dismiss the dialog. For that reason, it is not appropriate to claim command line safety unless we additionally make adjustment to the startup code to handle this case.
 
@mansellan if you can provide me with registry keys I need to include to support VS6 addin registration, I can update the installer.
 
> > vbWatchdog does it, so it must be good.

Lol, that made me chuckle. No, vbWatchdog does it because Wayne simply re-used the code from the VB6 branch :)

So AFAIK it's not applicable to VBA.
 
11:05 AM
@mansellan (I do presume it's at HKEY_CURRENT_USER\Software\Microsoft\Visual Basic\6.0\Addins with similar values we already use ATM for VBA but I just want to make sure that's all we need).
I also need the VS6's equivalent of HKEY_CURRENT_USER\Software\Microsoft\VBA\X.0\Common (where BackgroundCompile and CompileOnDemand settings are stored).
 
@this yep, this is all I had to add:
[HKEY_CURRENT_USER\Software\Microsoft\Visual Basic\6.0\Addins\Rubberduck.Extension]
"LoadBehavior"=dword:00000003
"FriendlyName"="Rubberduck"
"Description"="Rubberduck"
@this hmm, not seeing those settings. Looks like most of that stuff would be stored under the root key, but those 2 are not there:
 
Try and fiddle with the setting via VS6
not all keys are created until you actually tweak the settings
 
ah ok
 
(it has the options right?)
 
where are they in vba?
nvm i found them
 
11:17 AM
Tools -> Options -> General
(too slow)
 
looks like HKEY_CURRENT_USER\Software\Microsoft\VBA\Microsoft Visual Basic
 
hmm.... afaict its nowhere under [HKEY_CURRENT_USER\Software\Microsoft\Visual Basic\6.0\
 
and hte values are the same name & types?
 
just diffed with the option on and off, hive is binary identical
 
@mansellan look one folder higher as per @WaynePhillipsEA suggestion?
hm. did you close the VS6 between the diff?
 
11:26 AM
I didn't need to close, change acted immediately
 
ok
 
@WaynePhillipsEA I only have the default key at that level?
@this no, let me try that
checked the .vbp not there (wouldn't expect it to be, but you never know)
 
@mansellan, you sure? weird... definitely all there on my machine
 
@WaynePhillipsEA ah misread you're talking about VBA right?
 
nope, vb6
 
11:32 AM
oh!
wow - thanks MS, putting VB6 settings under /VBA...
 
> Thanks, @bclothier.
Have uninstalled green release 2.2 firstly and installed the ci linked 2.2.0.3137-pre without Run as Admin. Installs fine after expected Windows Defender SmartScreen allowing to run. The "Only You" option is enabled (nice!) so I selected this. Then prompts for wished to register RD, I left the default tick and complete the install. Works the moment I start the cDataSet test I had.
Version 2.2.6685.5179
OS: Microsoft Windows NT 6.2.9200.0, x64
Host Product: Microsoft Of
 
confirmed
 
@mansellan, great thanks
 
[HKEY_CURRENT_USER\Software\Microsoft\VBA\Microsoft Visual Basic]
"OBGroupMembers"=dword:00000000
"AutoValueTips2"=dword:00000001
"AutoQuickTips2"=dword:00000001
"AutoStatement2"=dword:00000001
"DragDropInEditor"=dword:00000001
"EndProcLine"=dword:00000001
"CompileOnDemand"=dword:00000001
"BackGroundCompile"=dword:00000000
 
> With VB6 support we should consider a command-line startup sequence that doesn't wire up the UI and its various commands, and allows running all tests & outputting results and messages to stdout; ditto for code inspections.

Until we can do either, the flag should remain at 0. If possible `CommandLineSafe` should only exist in the VB6 add-in registration, since it's useless in VBA.
> Enables installer to support registration for VS6.

For VS6 addin, also adds `CommandLineSafe`, set to `0` as we are not really command-line safe. Ref #3817
 
11:50 AM
Reviewing the VBESettings, I see that particular duck quacks but needs batteries.... doh!
It's using the VBA version to work out the registry path but VS6 is a VBA6, so that won't help me. I have to know the host environment, I think.
 
[rubberduck-vba/Rubberduck] build for commit 8578a233 on unknown branch: 57.67% (target 0%)
[rubberduck-vba/Rubberduck] build for commit 8578a233 on unknown branch: AppVeyor build succeeded
 
12:09 PM
> The Office 8 PasteFace method is *very* picky about formats. Not only must it be a 4bpp indexed BMP, it must have a fixed color palette with the indices in exactly the order it expects.

The upshot of this is that the only reliable way to create the images is using the built-in toolbar editor. BMPs created by any other means will not meet the above requirements. This includes simply using the .Net Bitmap class to parse the data prior to copying to the clipboard.

This means that we can onl
 
@Duga #NotComplicatedAtAllNope
 
> Using Version 2.2.6685.5179 (2.2.0.3137-pre) resuming what I meant to start again as a small testing on a cDataset sheet I have to work on. This file contains the project summary of 47 modules / 35 classes / 6 forms / 117 Document objects (sheets) that needs refactoring to adapt proper coding practices that RD considers best. With the Code Inspection grouping set to "By location". Just one little annoyance with Code Inspections I want to document here is a request to collapse ALL inspections i
 
12:28 PM
@Vogel612 I don't understand why the codecov apparently include random files that doesn't have anything to do w/ the commits. Example: codecov.io/gh/rubberduck-vba/Rubberduck/pull/3956/…
 
you mean the SmartIndenterParentMenu.cs?
 
and RubberduckIocInstaller, too - there's lot of files in there
 
I think GH diffs to merge-base and codecov diffs to target
 
Unfortunately it's not really helping me understand what I am missing on the test coverage.
 
missing?
 
12:36 PM
well, I thought the whole point of the codecov was to help flag lines that are not being hit by our test suite.
 
RootComWrapperFactory is on 0% coverage
the green-red in the codecov diff is just add-delete
 
but that's just the thing. I am nowhere close to that in the PR.
 
it's not related to coverage by itself
 
But there's a green/red on the left column
 
@Raystafarian that so-called "anti-pattern" eliminates the need to these ugly Hungarianesque m prefixes in the class' private fields, allows fields and properties to use the same identifier (and thus reduces typo opportunities), massively cleans up the locals debugging toolwindow, makes persisting instance state to a binary file a walk in the park, and will soon make Rubberduck be able to implement a whole class with two clicks. I came up with it, and until someone shows me how and why it's "wrong", I'll keep using it in CR & SO answers and blog posts. — Mathieu Guindon 17 secs ago
 
12:37 PM
I thought the green/red on the left column indicates the hit/miss
and they are independent of the green/red on the rest of the line which are +/= for commits.... but come to think of that, those aren't in the commit, either.
 
codecov kinda sucks ...
like ... badly
 
:(
Welp, for now I'll have to pretend I did cover all cases with the changes I made.
 
not too late to evaluate an alternative product for code coverage?
...just thinking...
 
maybe I need to adjust the codecov.yml to include the changed folders in the report?? :/
@PeterMTaylor didn't yet find a product that supported C# coverage
coverity and codeclimate are on it though, afaik
 
@this I was not concerned about getting the attributes, which we do already, but having a refactoring that sets them.
 
12:44 PM
codecov apparently has a slack channel
Maybe ask there?
@M.Doerner oh i see.
 
hmm ... apparently there is a NuGet package for Coveralls.Io
 
NuGet coveralls. That sounds... messy....
 
duck check: if I write a tiny (~100 SLoC) support utility (to be added to /tools?), the code in there doesn't have to be obsessive about patterns etc?
 
I don't see that Coveralls.Io has C# on their list yet. C and C++ though.
 
@mansellan why not a separate repo?
 
12:51 PM
@Vogel612 yep that sounds more sensible
 
@PeterMTaylor apparently there is a community-created tool to upload coverage to coveralls.io
 
okay...is the Codedev in XML form to be translated?
 
@PeterMTaylor we currently use OpenCover as coverage runner, which seems to be supported by that community project
 
...bit confused... So Codedev translates the analysis (?OpenCover? like a wrapper?)...?!?!?!
just trying to join the dots in me sleepy head
 
12:57 PM
It **might** be as easy as adding `coveralls.net` to the choco installs and then calling
`csmacnz.coveralls.exe --opencover -i "Rubberduck_Coverage.xml"` instead of `codecov -f`
 
My guess: OpenCover => tells you which line of code gets hit in a given test. It makes some report which is then submitted to CodeCov (or Coveralls), which proceed to compare from prior build/commit report and come up with a difference analysis.
 
won't hurt to try I guess on your development branch. Do you need the next branch to test out .yml changes?
 
OpenCover has no history or any memory of any previous tests. All it can give you is a big list of lines that was hit, and wasn't. On its own, it's not very easy to use, which is why we need reporting tools that can look at the commit history, etc.
 
  before_build:
    - cinst innosetup
-   - cinst codecov
+   - cinst coveralls.net
    - cinst opencover.portable
====
  test_script:
    # we use -returntargetcode to fail the build if tests fail
    - OpenCover.Console.exe -register:user -returntargetcode -target:"nunit3-console.exe" [...]
    # when using test_script, after_test seems to not be executed
-   - codecov -f "Rubberduck_Coverage.xml"
+   - csmacnz.coveralls.exe --opencover -i "Rubberduck_Coverage.xml"
 
(AIUI, at least)
 
1:00 PM
these changes should get us onto coveralls.io
note that we can actually run two coverage tools in parallel
 
i'd do that for a while.
 
also note that the yml changes are not supposed to trigger the build (though they currently totally do)
 
make sure that the other ship is seaworthy before we jump the sinking ship, no?
 
parallel per user or per branch into appvoyer?
 
@PeterMTaylor neither
 
1:03 PM
okay
 
I have been given some VBA related project
can someone help me
 
nice example. had a chuckle processing GameOfLife.sln file.
 
grab a gun and shoot me
 
no I detest violence unless we are joking... but we could do our best...
hello @Slereah. Please to meet you.
 
Hello
It's some legacy code from some old company gestion excel sheet
Written by someone who did not actually know how to program
 
1:05 PM
hello. install rubberduck, run inspections and show your boss what a mess they gave you
 
It's 10.000 lines of terrible code
Full of undocumented hidden sheets
 
well, we can't eat the elephant in one go, so as Vogel suggested run the RD code, do an assessment to see what qualifies as "bite size" you can handle. from that, you can guage what nexts steps. The bonus is feedback back to our community how to support your code going forward.
 
> The unreachable case inspection currently does not understand date literals.

```vba
Public Sub SomethingElse()
Dim bar As Date
bar = #6/5/2018#
Select Case bar
Case #5/5/2018# To #2/2/2019#
Debug.Print "First"
Case #6/5/2018#
Debug.Print "Second"
End Select
End Sub
```
Output: `First`
```vba
Public Sub SomethingDifferent()
Dim bar As Date
bar = #6/5/2018#
Select Case bar
Case #6/4/2018# + 1
 
Well, the one good thing is that I don't actually need to touch the code
The goal is to transfer all this mess into an online application
I just need to understand what it does
 
as in Azure online or a webserver?
 
1:08 PM
webserver
 
@Slereah BLAM!
 
does this webserver have a name?
 
None yet
 
@Slereah That's awesome.
 
okay no worries.
 
1:09 PM
@Duga urghlhlglhlglhrhrgrhlrlgrhrhl
dammit VBA
 
really I don't have anything against VBA specifically but the big issue is always the kind of people who decide to do a VBA application
2
That's how you end up with nothing but raw column and row numbers in the code
 
And just a giant stack of commands that could be replaced by a loop
 
@Duga I was not sure whether to use bug or enhancement; went with bug.
 
1:14 PM
Yeah, most "programmers" don't know anything worth knowing.
 
what may the primary purpose of these commands do? Are they all stacked together to achieve an objective?
 
@PeterMTaylor putting data from one sheet to another sheet
 
I finish a project, get it deployed to dev, and go from 100% busy to 100% nothing in my court.
 
@Hosch250 you could write the Code Metrics UI
 
At work?
I could, but I think I'll grub up something to refactor or work on my proposal to replace one of our systems.
 
1:17 PM
are you allowed @Hosch250 to play around with the backlog tickets to give yourself some more work?
 
@PeterMTaylor Yes.
But there really aren't any.
 
well then. :) have fun.
 
ATM, we don't have any new features in dev; we are just doing support work.
 
woot? make some more based on your observation of the current system. Would you understand DevOps?
 
So we have a whole IT department in a company that doesn't know how to run itself like an IT shop.
@PeterMTaylor Oh boy, yes, but I don't have dev ops privs.
Well, to a certain extent.
For example, take auto-deployment.
 
1:18 PM
could you "in principal" makes some DevOps work in development for support?
...just throwing a towel here...
 
If it was Azure, I could get it set up without the migrations in 1 minute, and with the migrations by the end of the day. I don't know how to access our webservers as it is, though, even theoretically having access to them.
Another of our devs has it almost done, fortunately.
@PeterMTaylor Possibly.
 
I'm sure you can find opportunities translated into tickets into some work once approved. :) anyhow time for bed for me.
 
Yes, that's basically what I said about the refactorings or my proposal for a rewrite (because a refactoring would be just too big to do without approval, really).
See you tomorrow.
 
> I agree it's good to be able to parse dates. I really wonder if this is really compared as a date, though. From this tests, it suggests to me it's not being compared as dates but as doubles.

First, some demonstration of how negative dates are "funny". Note that `-0.01` and `0.01` are considered the same date value.

```
Public Sub t()
Dim d As Date

d = 0
Debug.Print d

d = -1
Debug.Print d

d = -0.5
Debug.Print d

d = #12/29/18
 
Don't give up @Slereah. Just breath and take small steps. Its just comes down to how to solve a problem in abstract form which specific steps with RD can help out guage what's needed.
2
 
1:24 PM
@this isn't that the issue described? that these should be compared as dates instead of the current behaviour of comparing as doubles...
 
> The unreachable case inspection does not perform correct arithmetic calculations for all types and does not always determine the correct type of arithmetic expressions.

Example:
```vba
Public Sub Something()
Dim bar As Double
bar = 22
Select Case bar
Case 4
Debug.Print "First"
Case "2" + "2"
Debug.Print "Second"
End Select
End Sub
```
Output: `Second"
String addition is concatenation.

Inspection results:
![stringaddit
 
@Vogel612 read carefully. From what I see it looks like it's comparing as doubles, not as dates.
IOW, it's just sugar.
 
Dates are Doubles for comparison purposes, per spec.
 
oohhh ...
 
@M.Doerner Ok, that makes sense. Otherwise date1 To date2 wouldn't have made sense, I think.
 
1:26 PM
Actually, they are Doubles with different formatting and bounds checking.
 
Yeah, it's really a double with less "valid values" than an actual double.
 
Semantically, that makes sense.
 
I sympathize the variation of dates you mentioned eariler @M.Doerner
night
 
as long the engine parses the date literals into corresponding double value, it should be OK.
night
 
BTW, I hate that it converts all dates to US format and not ISO.
 
1:28 PM
yeah back in 90s, globalization wasn't exactly in front of MS's mind.
but even if they didn't care for globaization they still screwed it up because it's too ambiguous even using only US formats
but I also hate that it tries too hard. Even in a US region setting, it's valid to enter #23/04/2018#
 
Note that they strip the zeros in #06/05/2018#.
 
which isn't too unambiguous and will get converted to #04/23/2018# but that can be very confusing and misleading.
 
you get #6/5/2018#
 
yeah
 
You can even leave out the year.
Then you get an implementation dependent one.
 
1:32 PM
in Access i consistently format date fields in an uniform manner for UI. In programming, I always use the ISO where I need literals or must put date in a string for some reason.
 
In Excel, it is the current year.
 
yeah, I don't really mind that. This is helpful for data entry since people usually like to put in only 4/23 or even 4 23 or maybe 4-23, and all works. That's good for UI. But the database better store it as 2018-04-23 and no any other format is acceptable to me.
 
1:45 PM
> Per specification, VBA logical operators are bit operators that return booleans one of the integral data types, `Byte`, `Integer`, `Long` and `LongLong`. The unreachable case inspection does not understand this.

```vba
Public Sub DoSomething()
Dim bar As Long
bar = 20
Select Case bar
Case 1 Or 2
Debug.Print "First"
Case 4 Or 16
Debug.Print "Second"
End Select
End Sub
```
Output: `Second`

Inspection results:
![logicalope
 
2:02 PM
> Just to throw it out there...

@mansellan in case you want to try hooking the clipboard API as I mentioned earlier in the thread, here's some untested code to get you started:

```
var CreateFileHook = EasyHook.LocalHook.Create(
EasyHook.LocalHook.GetProcAddress("user32.dll", "GetClipboardData"),
new Delegate_RDGetClipboardData(RDGetClipboardData),
this);

// Activate the hook on this thread only
CreateFileHook.ThreadACL.S
> Just to throw it out there...

@mansellan in case you want to try hooking the clipboard API as I mentioned earlier in the thread, here's some untested code to get you started:

```
var Hook = EasyHook.LocalHook.Create(
EasyHook.LocalHook.GetProcAddress("user32.dll", "GetClipboardData"),
new Delegate_RDGetClipboardData(RDGetClipboardData),
this);

// Activate the hook on this thread only
Hook.ThreadACL.SetInclusiveACL(new i
> For reference, by section 2.1 of the VBA specification, a date is an 8-byte IEEE 7541985 floating oint number, i.e. a Single, that is interpreset as the (fractional) number of days since(positive)/before(negative) midnight of December 30, 1899.
> For reference, by section 2.1 of the VBA specification, a date is an 8-byte IEEE 7541985 floating point number, i.e. a Single, that is interpreted as the (fractional) number of days since(positive)/before(negative) midnight of December 30, 1899.
 
@Duga @M.Doerner don't you mean Double? Single are 4 bytes.
@Duga I'm curious --- does EasyHook have the potential to trip up security mechanisms? I understand that Windows may try to prevent hooking into system DLLs?
 
2:24 PM
@this well we're already using it to hook into the VB runtime itself..
 
that's in the Microsoft shared, isn't it?
 
I have a week off in 5 weeks.
Maybe I can take a look at that UI then.
 
IDK if we already do that for any system DLL in the System32/SysWOW64 -just curious if this trips alarm bells.
 
@Hosch250 I'll be in Orlando in 5 weeks :)
@this hmm
 
@MathieuGuindon Nice.
The great thing about OSS is I don't need you around to do the UI :)
 
2:28 PM
lol
 
@this potentially. Never personally seen anything flagged for just hooking a function, but I would guess it would depend on the function being hooked as to whether it could be regarded as potentially malicious.
 
that's using injection though. This is just function hooking.
 
Oh ok, didn't realize there's a difference.
I do see in other references EasyHook basically is a user-mode hooking, so there's that.
 
yeah, injection is where you 'inject' a DLL into a process at runtime. Our RD DLLs are already loaded, and were just basically modifying a function pointer
Arguably, if EasyHook does offer injection features, it could well trigger red flags by just referencing the library itself.
 
2:36 PM
that article is old, though. I think we have more recent version of EH now
 
plus we already have it referenced without any known issues to date
 
and it was mentioned that it changed between then and now, so hopefully no injection. Yeah, it'd ahve been reported by everyone already, I think.
 
> @WaynePhillipsEA that's hugely appreciated, and very timely. Something odd is going on atm - I'm putting the exact same bytes in the exact same place on the clipboard as is done by CopyFace, and it's not wroking correctly. Office is doing something else under the covers that I'm not seeing atm.
 
OK, GTK. Just didn't know how security mechanisms applies to hooking to system functions.
 
bbl
 
2:38 PM
> I'm pretty sure it's similar to what I mentioned earlier, what you write in, isn't what you read out. It is likely doing more than just eating some bytes.
 
RegEx question: I have the string abc 11.22.33. If the string contains the pattern \d{2}.\d{2}.\d{2}, I want to return whatever came before it ("abc " in this case). How do I modify my RegEx pattern to do this?
 
you need a grouping expression.
so prolly (.+)\d{2}\.\d{2}\.\d{2}
 
something like ([*]) \d{2}.\d{2}.\d{2} ?
OK, that would prolly do it too... :)
 
note that the . is special
so that would match stuff like abc 11 22|33
which you might not want
so if you want literal ., escape it, too.
 
. is one char, right? I want * so it's one or more...
ah, yes, those .s...
 
2:43 PM
sure.
 
yeah, they'd need to be escaped.
 
let them fly free, man!
 
how, with VBA RegEx, do I then return the grouped expression so I can use it?
lol^^
 
uh..... in the Replace, you backreference them as {1}... something.
 
hrm... but I don't want to replace the numeric part, I just want to return the alpha part (which could, potentially, contain numberics)
I guess I could replace the matching part with nothing, that would yield just the non-matching part which is what I'm after...
 
2:48 PM
i sue this as a reference for VBScript regex.
because it's..... wonderfully quirky
 
turns out it's $1 for the first grouping expression.
 
I'll read the other, too
 
@FreeMan Danger, Will Robinson. Thar be .NET there.
.NET RegEx != VBScript RegEx
 
I did note that, too...
 
2:51 PM
has nobody ever compiled a COM-visible .net DLL that wraps System.Text.RegularExpressions.RegEx?
 
BTW- I think The Scripting Guys are named Cleese, Palin & Idle
 
@MathieuGuindon no... now that you mention that, it sounds painfully stupidly obivous....
@FreeMan lol
 
3:13 PM
I'm having some very odd behavior on my work machine. Just had a new machine installed a few weeks ago running Win10. Every now and then, I'll be typing in the VBE and suddenly the Access or Excel parent process will get the focus and I'll end up typing characters there.
It might just be a memory issue... As I was typing that up, a red smudge suddenly appeared in the text box, then a few moments later it disappeared.
Maybe I'll confirm it's OK with my IT guy and run memtest86+ on it over the weekend...
weird...
 
3:27 PM
@duga @this My level of concentration is too low to do basic math.
 
> Possibly - but what I don't understand if that's the case is why I can (using the built-in toolbar editor) copy from one instance of VB6 and paste into another. I guess its possible it's doing some extra inter-proc communication, but feel its more likely to just be eating what's on the clipboard.

That said, I've just dowloaded a clipboard monitor from [here](https://www.codeproject.com/Articles/22624/ClipSpy), and I can see now that it uses more than just Toolbar Button Face and Toolbar But
 
3:45 PM
> One problem is that the UI is not really a tree - it's a custom *grouping grid* XAML control that we reuse in several places; I suppose we could enhance the control with better grouping capabilities, but ultimately IMO the inspection results toolwindow is *in itself* the problem... Can't wait to be able to simply remove it!

Perhaps a *module filter* could be useful and easier to implement? A bit like how inspection settings can be filtered by inspection name, results could be filtered by mo
 

« first day (1418 days earlier)      last day (1762 days later) »