Author Topic: Register: Call to OS function failed?  (Read 8293 times)

0 Members and 1 Guest are viewing this topic.

Nikolay

  • Sr. Member
  • ****
  • Posts: 286
    • UnmanagedVisio
Register: Call to OS function failed?
« on: December 09, 2010, 12:43:35 AM »
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 ;)

Get Visio Guy's new book!


Paul Herber

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2074
    • Sandrila Ltd
Re: Register: Call to OS function failed?
« Reply #1 on: December 09, 2010, 03:50:47 AM »
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.
Engineering, business and software stencils and applications for Visio - http://www.sandrila.co.uk/
Twitter: http://twitter.com/sandrilaLtd

Visit the Visio Guy web site at www.visguy.com for hundreds more articles on Visio!


Nikolay

  • Sr. Member
  • ****
  • Posts: 286
    • UnmanagedVisio
Re: Register: Call to OS function failed?
« Reply #2 on: December 09, 2010, 04:31:37 AM »
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

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2074
    • Sandrila Ltd
Re: Register: Call to OS function failed?
« Reply #3 on: December 09, 2010, 04:39:31 AM »
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.
Engineering, business and software stencils and applications for Visio - http://www.sandrila.co.uk/
Twitter: http://twitter.com/sandrilaLtd


Nikolay

  • Sr. Member
  • ****
  • Posts: 286
    • UnmanagedVisio
Re: Register: Call to OS function failed?
« Reply #4 on: December 09, 2010, 05:18:21 AM »
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

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2074
    • Sandrila Ltd
Re: Register: Call to OS function failed?
« Reply #5 on: December 09, 2010, 05:35:26 AM »
Yes, you are right, I was thinking of a different error that occurs at another place!
Engineering, business and software stencils and applications for Visio - http://www.sandrila.co.uk/
Twitter: http://twitter.com/sandrilaLtd


Paul Herber

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2074
    • Sandrila Ltd
Re: Register: Call to OS function failed?
« Reply #6 on: February 04, 2011, 02:58:09 AM »
Do you have Visual Studio installed?
Engineering, business and software stencils and applications for Visio - http://www.sandrila.co.uk/
Twitter: http://twitter.com/sandrilaLtd

Nikolay

  • Sr. Member
  • ****
  • Posts: 286
    • UnmanagedVisio
Re: Register: Call to OS function failed?
« Reply #7 on: February 04, 2011, 04:25:33 AM »
Hi Paul, yes I have VS installed, in fact, two of them (2008 and 2010)

Paul Herber

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2074
    • Sandrila Ltd
Re: Register: Call to OS function failed?
« Reply #8 on: February 16, 2011, 12:43:36 PM »
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.
Engineering, business and software stencils and applications for Visio - http://www.sandrila.co.uk/
Twitter: http://twitter.com/sandrilaLtd

Nikolay

  • Sr. Member
  • ****
  • Posts: 286
    • UnmanagedVisio
Re: Register: Call to OS function failed?
« Reply #9 on: February 25, 2011, 06:14:34 AM »
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

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2074
    • Sandrila Ltd
Re: Register: Call to OS function failed?
« Reply #10 on: March 02, 2011, 08:37:13 PM »
Hi Nikolay, hmmmm, very interesting idea, thanks. Ok, I think I have to try some things. I'll be back.
Engineering, business and software stencils and applications for Visio - http://www.sandrila.co.uk/
Twitter: http://twitter.com/sandrilaLtd

Paul Herber

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2074
    • Sandrila Ltd
Re: Register: Call to OS function failed?
« Reply #11 on: March 21, 2014, 06:27:19 AM »
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!
Engineering, business and software stencils and applications for Visio - http://www.sandrila.co.uk/
Twitter: http://twitter.com/sandrilaLtd