Posts

Showing posts from January, 2013

PRB: Windows 8, MSXML4 Application Error 429: ActiveX component can't create object

Image
This article was previously published under MSXML4 WIN8 ELEVATION FAIL On This Page SYMPTOMS When you create an instance of an MSXML2.DomDocument40 in VB6 or VBSCRIPT (32-bit), you will receive the following error message: Application Error 429: ActiveX component can't create object The error only occurs if your process is running with elevated (administrator) privileges, on Windows 8.   CAUSE Microsoft broke this for some reason but chances are its an unmitigated security vulnerability.  (And, we like to be jerks). RESOLUTION To work around this problem, use either of the following methods: Downgrade to Windows 7, 2008, Vista, or XP Replace references to msxml4.dll with msxml6.dll  Replace MSXML2.DomDocument.4.0 with MSXML2.DomDocument.6.0 in your code STATUS This behavior is by design.  Or, maybe its a bug.  We really don't care, as long as you port your crappy VB6 code to .NET. MORE INFORMATION Steps to Reproduce Behavior Execute the following code in a compiled VB6 executab

Raising events in VB6 from .NET via COM Interop

Image
So I've been experimenting with VB6 and a .NET DLL compiled with COM interop to see how it behaves.  The results are a little surprising. What I did was I built a test scenario where the "Client" (vb6 app) hangs for 5 seconds while the "Server" (.NET COM object) fires an event once per second. First, I start the timer.  Inside the DLL on each timer tick, it adds 1 to an internal counter ("Count").  When the timer fires, it raises an event and passes the value of Count at that time as a parameter (nTicks). When the client app (vb6) hangs, internally the count continues to run, but the events get queued up.  VB6 gets all the events in a rush when the 5 second sleep is over.   Here's the part where it gets interesting.  During that rush, the events come in out-of-order .  The order seems random.  I've run it several times and the order always varies.  I circled the interesting part in red, below. Aside from the return order issue I think this thre
Found a neat program today written in VB6 that looks and acts just like a Windows 8 Metro App. Here  is a link to the proect on planet-source-code.  And  here  is the author's blog site where he has other neat VB6 things.  (Its all in French, but Chrome graciously translates the web page to English for me.  Google Chrome is such a nice product!)