How to get JavaScript working using Callback with COM

Imagine you have a scenario wherein you want your COM Server to be called within JavaScript which invokes an Async method. Upon completion of the Async method you would like to notify the JS using callback function that the task has been completed. Doing the Async work is simple but the callback to notify the…

0

COMException (0x800a01ad): ActiveX component can’t create object

While troubleshooting an issue with a customer I found this error from an ASP.Net page while trying to create a COM object. The web page was hosted from IIS6 on a Windows Server 2003 machine. Troubleshooting further I figured that the OS was 64 bit and w3wp.exe was running as a 64 bit process trying…


CredUIPromptForWindowsCredentials return junk characters if you P/Invoke it from managed code on OS’s such as Spanish or French.

If you are using StringBuilder for passing in the username, password and domain name to CredUIPromptForWindowsCredentials it might cause this issue. Pass IntPtr for username, password and domain name as shown in the code snip below. [DllImport(“credui”, EntryPoint = “CredUnPackAuthenticationBufferW”, CharSet = CharSet.Unicode, SetLastError = true)] internal static extern bool CredUnPackAuthenticationBuffer(    uint dwFlags,     IntPtr…

0