Register: Call to OS function failed?

Started by Nikolay, December 09, 2010, 05:43:35 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Nikolay

The registration of Visio Super Utilities does not seem to work on Windows 7 x64? Even if you run Visio as Administrator, i.e. UAC is off. Visio 2007 Prof.
It works fine on XP though. Please consider fixing ;)

Paul Herber

Hi Nikolay, this is a problem I've heard about occasionally. Nobody seems to know what causes it, Googling for the problem brings up all sorts of ideas.

Start the registry editor, go to key
HKEY_CURRENT_USER\sandrila_vsu.ini\RegistrationKey
and create a key called "Key". Right-click -> Modify
and paste in the registration key.
Please let me know if you have any problem.
Electronic and Electrical engineering, business and software stencils for Visio -

https://www.paulherber.co.uk/

Nikolay

Hi Paul,

The registration itself was successful (i.e. the key value was successfully written by addon itself),
it was just this odd window about "OS function failed" was shown.

Thanks, Nickolay

Paul Herber

Hi Nikolay, maybe 2% or so of users have reported this problem, naturally I can't reproduce it here! I tried sending debug versions to various customers trying to find where the problem comes from but the error seems to be from before my code starts. "A call to an OS function failed", I can imagine less informative messages! Doing a searching for this error brings up all sorts of reports in all sorts of software, but nothing conclusive.
Electronic and Electrical engineering, business and software stencils for Visio -

https://www.paulherber.co.uk/

Nikolay

Hi Paul,

Feel free to send me log/debug version. Or symbols (SYM) file, so I can send you the stack trace of error.
It seems that this is not the problem with the registry write though; I've monitored using ProcMon, all registry writes appear to be successful. There is an exception thrown though, and this dialog seems to be shown from an exception hander. I.e. it seems that this happens actually later when the addon tries to show "Registration key is accepted" message box, and not when it writes to the registry.

Anyways, thank you for the utilities!
Kind regards, Nikolay.

Paul Herber

Yes, you are right, I was thinking of a different error that occurs at another place!
Electronic and Electrical engineering, business and software stencils for Visio -

https://www.paulherber.co.uk/

Paul Herber

Electronic and Electrical engineering, business and software stencils for Visio -

https://www.paulherber.co.uk/

Nikolay

Hi Paul, yes I have VS installed, in fact, two of them (2008 and 2010)

Paul Herber

Hi Nikolay, I've pinned this problem down to the installation of Visual Studio (there may also be other software installations that cause the same problem). I now have a system here where without VS my software works fine, install VS and this error message occurs in certain places. Uninstall VS and the error messages disappear.
The message appears to occur when there is a dialog box on the screen and my software tries to open another dialog box, the most common reason for this is to show an error or information dialog box, like "registration accepted". So, this error occurs when displaying the standard message dialog box, also when showing the "open folder path dialog" but not the open file or save file dialogs. There is also an identical problem when using a tabbed dialog box and trying to open one of the other tabs (this is in my SDL for Visio application).
So, I've got around this problem within the utilities by never opening a second dialog box but always showing the current status within the main dialog.

I've tried asking about this error ("A call to an OS function failed") in the MSDN Visio Studio forum but the only person who responded to my message totally misunderstood what I was talking about and moved my post into an "off topic" area of the forum.
Electronic and Electrical engineering, business and software stencils for Visio -

https://www.paulherber.co.uk/

Nikolay

Hi Paul,

I don't think this issue has anything to do with Visual Studio actually; I believe this must be some Delpi-related issue. As far as I know this message only exists in Delphi runtime, i.e. it is not an OS- message. The problem is most probably that Delphi runtime calls the SetForegroundWindow function when it activates a new form. And this function fails because the behavior of this function was changed in Vista (and above), especially if UAC is activated, but good old Delphi does not expect this function to fail, and throws an exception.

This is all just my guess of course.

Paul Herber

Hi Nikolay, hmmmm, very interesting idea, thanks. Ok, I think I have to try some things. I'll be back.
Electronic and Electrical engineering, business and software stencils for Visio -

https://www.paulherber.co.uk/

Paul Herber

The Visio Super Utilities are in the process of being ported to a new development platform (Lazarus/Free Pascal - it is wonderful!) - got some testing to do and a few fiddly bits to finish off - this little problem will soon be history!
Electronic and Electrical engineering, business and software stencils for Visio -

https://www.paulherber.co.uk/