How to call a complex COM method from PowerShell?

This problem did interest me, so I did some real digging and I have found a solution (though I have only tested on some simple cases)! Concept The key solution is using [System.Type]::InvokeMember which allows you to pass parameter names in one of its overloads. Here is the basic concept. $Object.GetType().InvokeMember($Method, [System.Reflection.BindingFlags]::InvokeMethod, $null, ## Binder … Read more

What does “Method ‘~’ of object ‘~’ failed” at runtime mean?

That can happen when supporting libraries (dlls or ocxs) are not registered properly or the versions of the installed libraries are different (and incompatible) with the version the app was compiled against originally. Make sure all dependent libraries are registered and the proper version. You may have to recompile the app to make it work … Read more

Unload a COM control when working in VB6 IDE

I’m pretty sure there’s no good way to force VB6 to unload the control. Here’s what I do… instead of running Visual C and Visual Basic side-by-side, run VB6 under VC : Load up VC Open the project containing your COM objects Edit, change, etc. In VC, set the Output Executable to be VB6.EXE with … Read more

What is the difference between COM and OLE?

OLE = Object Linking and Embedding DDE = Dynamic Data Exchange COM = Component Object Model OLE: This is a method of linking parts of one document to parts of another. For example, having a PowerPoint slide with an Excel chart embedded into it. When the Excel spreadsheet is updated, the chart should update too. … Read more

Generate manifest files for registration-free COM

It looks like the perfect solution does not yet exist. To summarize some research: Make My Manifest (link) This tool scans a VB6 project to look for COM dependencies, but it also supports manual declaration of late-bound COM dependencies (i.e. those used via CreateObject). Interestingly enough, this tool puts all information about the dependencies inside … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)