Error while receiving Verisign Authenticode certificate

Today when I was downloading/receiving Verisign Authenticode certificate I got the following error window:
---------------------------
VBScript
---------------------------
Error: 1AD occured, your certificate may not be co`rrectly installed
---------------------------
OK
---------------------------

Then I was redirected to the page with the following text:
Your Certificate Could Not Be Installed Your certificate could not be installed in your web browser. The most likely reasons for this problem are:


The certificate is already installed.
Check your installed certificates. In Internet Explorer, go Tools > Internet Options and select the Contents tab. In the Certificates section, click the Certificates button. In the Personal tab, review the list of certifiicates. If your certificate is in the list, you do not need to install it again.


The browser and/or computer you are using now is not the same one used when you enrolled for your certificate.
You must use the same browser on the same computer to enroll for and install your certificate.


You are not running the latest version of Internet Explorer.
Click here to get the latest version of Internet Explorer.


The certificate database in the Web browser is not accepting the new certificate (the database may be corrupted).
Reinstall Internet Explorer and enroll again for the certificate.

It seems, that Verisign site is trying to install this certificate two times, because when I looked at the installed certificates in Internet Explorer, the certificate was already there.

Posted in Computers, Web | Tagged , , , | Leave a comment

Call to OpenFileDialog or SaveFileDialog hangs or freezes

Today I was debugging a very strange issue when call to OpenFileDialog and SaveFileDialog hanged, froze, never returned…

At first I thought the problem is, that call is made from SysTray (Notification area) hidden window. However, digging deeper things got more bizarre. I found a thread in MS forum, where was a workaround – add help button to OpenFileDialog.

When I say that it “hangs” I mean that the dialog does not display but no exception is thrown and the system eventually throws in a little wait cursor to indicate that the program is getting time. It doesn’t hang the entire computer, fortunately, but the application has to be terminated.

For OpenFileDialog the ShowHelp property must be explicitly set.
For SaveFileDialog the ShowHelp, CreatePrompt, and OverwritePrompt properties must be explicitly set.

It’s not consistent though. I’ve had SaveFileDialog work with just ShowHelp set in simple situations. But I have an app which didn’t start running again until I also set CreatePrompt and OverwritePrompt properties then it started working again. They don’t have to be set to true, they just have to be initialized to either true or false.

Original forum post: click here.

So I tried:
myDialog.ShowHelp = true;

And it worked. So bizarre I thought.

After little more testing I found next problem. If file is not found, then dialog must show warning that ‘File not found. Check the file name and try again.’ And it showed the warning… and hanged…

From the beginning I was ignoring one fact, that this actually is a .NET COM object, and that I am calling it from MTA threading model (multi-thread apartment). By default .NET COM objects advertise themselves as BOTH (STA, MTA), so I changed calling thread to STA. Changed CoInitializeEx to CoInitialize, and suddenly everything worked like a charm.

I am not a COM expert, so if you find some flaws please let me know in comments!

Posted in Computers, Programming | Tagged , , , | 3 Comments

2011 links no. 1

3D Software Rendering Engine – Part I by darkoman.

Fluent CSV/XML Exporter For List by Sacha Barber allows to export / save any C# container to CSV and XML.

Push Framework – A C++ toolkit for high performance server development in Windows by Ahmed Charfeddine.

Next part in Task Parallel Library: 5 of n by Sacha Barber.

ISO C++ Committee Approves C++0x Final Draft. Standard is going to be published, to be known as C++ 2011.

Is it reasonable to use the prefix increment operator ++it instead of postfix operator it++ for iterators. Andrey Karpov about C++ iterators.

Which Version of .NET is Built into Windows? To my surprise, Windows Server 2008 have .NET 3.0 off by default.

Microsoft Mathematics (formerly Microsoft Math) is free as in beer.

What do you do for lunch every day? Where do you eat it? With whom? Joel Spolsky writes about software teams.

Invoke .NET Assembly from Native C++ Code. With examples for Visual Studio. Hosted on CodePlex.

The attackers plant their PHP scripts, similar to those I described in previously mentioned diaries. These scripts vary from simple to very advanced scripts that can automatically monitor Google trend queries and create artificial web pages containing information that is currently interested. More on Google image poisoning.

Video: How Google is protecting their Data Centers (logically and physically).

Posted in OS, Programming, Web | Tagged , , , , , , , , , | Leave a comment

Strange file named “剐䍏塅ㅐ〰匮卙” in C:\Windows\System32\drivers

Today, looking in directory C:\Windows\System32\drivers, I found strangely named file “剐䍏塅ㅐ〰匮卙”. First thought was: it is driver form LG PC suite… I remember, that some files have Korean characters in it. However, looking closer, I found, that file is digitally signed by Sysinternals.

So it can not be a computer virus, because in that case they would need a private key form Microsoft Sysinternals.

I have a couple of programs from Sysinternals installed. So I started to google, but could no find answer easily. Here is a link to relevant discussion. Running logonsessions creates…

It talks, that file C:\Windows\System32\drivers\剐䍏塅ㅐ〰匮卙 is created by LogonSessions utility. So file really comes from Microsoft, so it is not a virus.

Posted in Computers, OS | Tagged , , , | Leave a comment

fatal error C1083: Cannot open include file: ‘ammintrin.h’: No such file or directory

I can not compile my C++ projects after installing ‘Security Update for Microsoft Visual Studio 2010 (KB2455033)’, see my yesterday’s post: Security Update for Microsoft Visual Studio 2010 (KB2455033) failed with Code 643.

Visual Studio 2010 shows the following error:
1>------ Build started: Project: some_project_name_i_am_hiding, Configuration: Debug Win32 ------
1> stdafx.cpp
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\intrin.h(26): fatal error C1083: Cannot open include file: 'ammintrin.h': No such file or directory
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Error is caused because file intrin.h have reference to ammintrin.h, and after this update there is no such file. Relevant fragment from intrin.h:
#if defined(_M_IX86) || defined(_M_X64)
#include <immintrin.h>
#include <ammintrin.h>

Searching Google for the answer I found only one link in Russian. Russian developer says, he have reinstalled Visual Studio. Tried to search MS Connect again, and found: Windows Update KB2455033 breaks build with missing ammintrin.h.

The workaround is to install Visual Studio 2010 SP1. Download it form Microsoft Website: Microsoft Visual Studio 2010 Service Pack 1 (Installer).

Installing service pack 1 takes some time while I am writing this blog post… 30 minutes… And Building / compiling after SP1 is successful. So installing Microsoft Visual Studio 2010 Service Pack 1 fixes this issue.

Screenshots from the process below.

Posted in Programming | Tagged , , , | 2 Comments

Security Update for Microsoft Visual Studio 2010 (KB2455033) failed with Code 643

Yesterday tried to install ‘Security Update for Microsoft Visual Studio 2010 (KB2455033)’ via Windows update on Windows 7 Ultimate 64-bit but it failed with Code 643. Installation constantly failed with Code 643 – Some updates were not installed.

Currently Google search does not shows anything useful, however Microsoft Connect have listed 4 workarounds. I tried only last one, and it worked.

Posted by AleALEJANDRO on 4/14/2011 at 3:28 AM
It works!

1. Install this to update Visual C++ Compiler: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=689655B4-C55D-4F9B-9665-2C547E637B70&displaylang=en

2. Install this to update the rest: http://www.microsoft.com/downloads/en/details.aspx?familyid=936b6b1f-a854-4cbb-904b-3e5dcf2c9c7e&displaylang=en

For more information go to MS Connect – Error installing Windows Update KB2455033.

Below are gallery with relevant screenshots.

Posted in OS, Programming | Tagged , , | 10 Comments

Test Silverlight speed or Test CPU speed with Silverlight

While we were developing SilverBench (online multicore CPU benchmarking with Silverlight), I found one interesting benchmark project.

It is called Balls / Bubblemark animation test. You can test and directly compare speed / performance for the following programming languages: JavaScript, Silverlight (C#), Flash (ActionScript) and Java. Source code is provided. Project is maintained from 2007 and last time updated in mid 2009.

Posted in Programming, Web | Tagged , , , , , , | Leave a comment

Underused features of Windows batch files

StackOverflow have another interesting topic about: Underused features of Windows batch files.

Of course there are many things I didn’t know about. Some highlights:

PUSHD path
Takes you to the directory specified by path.
POPD
Takes you back to the directory you “pushed” from.

By using CALL, EXIT /B, SETLOCAL & ENDLOCAL you can implement subroutines with local variables.

example:

@echo off

set x=xxxxx
call :sub 10
echo %x%
exit /b

:sub
setlocal
set /a x=%1 + 1
echo %x%
endlocal
exit /b

This will print

11
xxxxx

even though :sub modifies x.

Creating an empty file:

> copy nul filename.ext

The equivalent of the bash (and other shells)

echo -n Hello # or
echo Hello\\c

which outputs “Hello” without a trailing newline. A cmd hack to do this:

<nul set /p any-variable-name=Hello

set /p is a way to prompt the user for input. It emits the given string and then waits, (on the same line, i.e., no CRLF), for the user to type a response.

<nul simply pipes an empty response to the set /p command, so the net result is the emitted prompt string. (The variable used remains unchanged due to the empty reponse.)

Problems are: It’s not possible to output a leading equal sign, and on Vista leading whitespace characters are removed, but not on XP.

Command separators:

cls & dir
copy a b && echo Success
copy a b || echo Failure

At the 2nd line, the command after && only runs if the first command is successful.

At the 3rd line, the command after || only runs if the first command failed.

Doesn’t provide much functionality, but you can use the title command for a couple of uses, like providing status on a long script in the task bar, or just to enhance user feedback.

@title Searching for …
:: processing search
@title preparing search results
:: data processing

And there are many more. If you want to learn something new, this topic is must have reading!

Posted in OS, Programming | Tagged , , , | 2 Comments

Another free Syslog Daemon for Windows

Jan 13, 2011 I wrote about Free Syslog Daemons for Windows. I just found another one, also from MikroTik, and it is free too.

The Dude for Windows has one less known feature – it can capture Syslogs sent via network.

Posted in Computers, OS | Tagged , , | Leave a comment

March 2011, links

HTML5 Web Storage in Essence from Wayne Ye.

Sacha Barber again about: Task Parallel Library (3 of n).

Video of: Upgrading through every version of Microsoft Windows.

Posted in Web | Tagged , , , | Leave a comment