Solving Performance Problems with Microsoft Dynamics GP and Windows 10 – Part 1

David Meego - Click for blog homepageNow that I am running Windows 10 and am starting to get back to work with developing for Microsoft Dynamics GP and Dexterity, I have been noticing some serious performance issues.

This article takes you through the steps I used to identify the issue and what I did to resolve the issues. After making the changes listed in this and the next article I am happy with my Windows 10 development environment.

The first issue I noticed was that when I exited Dexterity Test mode, there was a significant delay (about one minute) before I was returned to the Dexterity IDE (Integrated Development Environment). I tested this on multiple Dexterity versions and it still occurred. To make sure that it was nothing in my code, I tested using a clean Dynamics.dic and it still occurred.

To test if it was a Dexterity issue or Microsoft Dynamics GP in general, I started testing with multiple versions of Microsoft Dynamics GP and each time there was a minute pause when exiting. The problem was occurring for all current versions (GP 2010, GP 2013 and GP 2015) in both the runtime and development environments.

Note: I did not have this issue on my other Windows 10 machine, so it does not occur for all machines. It just occurred on my primary development machine. 😦

So now I put my Microsoft Escalation Engineer hat back on to troubleshoot and identify the cause. Using a source dictionary in Dexterity, I used the Script Log to capture the scripts running when you exit GP. The excerpt from the script.log file below shows two calls to the script exitDynamics of form Main Menu with a significant 30 second plus time before the next script.

14:12:04  'Main_Menu FORM POST on form Main Menu'
14:12:04      'exitDynamics of form Main Menu'
14:12:40          'SQLPath', 0, 7, 31, ""
14:12:40          'GetClientUIType()', 0
14:12:40          'Add_Successful_Logout_Record'
14:12:40          'DeleteUserMessages of form sySendMessage', "sa"
14:12:40              'SQLPath', 0, 7, 0, ""
14:12:40          'IsCreated() of form syDeferredPassword', 0
14:12:40      'isDynUtils() of form LibSystem', 0
14:12:40      'exitDynamics of form Main Menu'
14:13:12          'GetClientUIType()', 0
14:13:12          'Add_Successful_Logout_Record'
14:13:12          'DeleteUserMessages of form sySendMessage', "sa"
14:13:12          'IsCreated() of form syDeferredPassword', 0
14:13:12      'smDEX_Clear_Locks', 0, 15
14:13:12          'SQLScriptPath', 0, 7, 3069, ""
14:13:13      'ST_CleanupBeforeLogout'

Looking at this script, the issue had to occur between the start of the script and the first call to the GetClientUIType() function. So I placed a breakpoint at the top of the script and stepped through the script until it hit the pause. Below are the lines of code and the command causing the pause was the DDE_IsAppRunning(CONTAIN) call.

if (TEMPCloseOLE of globals) then
    if DDE_IsAppRunning(CONTAIN) then
        set fDummy to OLE_Exit();
    end if;
end if;

Looking at the DDE_IsAppRunning(CONTAIN) call, I could see that it was inside a conditional statement and so if we changed the value of the global variable TEMPCloseOLE of globals it should be possible to avoid the pause on exit issue.

Using the trusty References facility in Dexterity, I located the TEMPCloseOLE global field and asked what it was referenced by. In the global procedure Setup_System_Variables, I found the following lines.

set sFlag to Defaults_Read(DEXINI_OLECLOSE);
set TEMPCloseOLE of globals to (sFlag <> FALSE_STRING); 

This showed that the TEMPCloseOLE of globals variable was set once based on the Dex,ini setting referred to by the constant DEXINI_OLECLOSE (which evaluates to OLEClose).

With this information in hand I added the following Dex.ini setting to my system and tested again:


Et Voila, the delay on exit disappeared. First problem solved. I forwarded my research to Microsoft Support in case anyone else was having this issue…. and it turned out that others had seen it.

The delay on exit issue was reported on the partner forum and my “workaround” solution was provided, then my friend Mariano blogged about it. Here are the links:

Hope this information helps take away the frustration I was having.


PS: I don’t really speak French, even though I did study it (and Latin) in primary school in the UK before I moved to Australia. I have even been to France, but that did not help.

PPS: Before you ask, I don’t speak Latin either… it is a dead language and even the Italians don’t speak it any more.

PPPS: OK, yes I know that even though Latin is dead, its influence lives on in many European languages.

This article was originally posted on

9 thoughts on “Solving Performance Problems with Microsoft Dynamics GP and Windows 10 – Part 1

Please post feedback or comments

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.