Hi,the Trick:

I read your VBCDeclFix project description, very clever.

Then I recognize that the vb TypeLib import api can be annotated to disable getlasterror. Is it possible to go through something similar to VBCDeclFix so that the VB declare function doesn't generate getlasterror code?