I can confirm I get the same error when I disable my sound devices with your code...
Just make sure your users have a speaker attached but turned off it not required, but you can always access User32.DLL to grab this information [I think that is the right DLL or I could be wrong...] but if it uses the same method and could likely be, then you will have the same error either way...
Considering most users will have speakers attached [Specially in the case of laptops, you can brush this aside as a user issue, but again see if using the Windows DLL's to grab this data gets you around this problem...
Just be sure to use proper methods to deal with the DLL loading and deleting it from memory when not in use...
I think this can be marked as accepted/confirmed but I cannot see a fix for Enhancements unless it is an internal TGC product as I am unsure who the developer is right now...
FURTHER
According to this post
http://www.codeproject.com/Articles/2308/Get-The-User-Name-In-C-For-NT-Authentication it appears as the DLL is "advapi32.dll" and the information is held in "GetUserNameA"...
FURTHER
A quick search on the forum for "user32.dll for username" in forum search brought about
http://forum.thegamecreators.com/?m=forum_view&t=53276&b=18 as a first result and it uses
"" Useful Windows DLL functions (
Kernel32.dll, User32.dll, Advapi32.dll)""
Hope this helped
Please post back if this fixed the issue, I am avoiding using DLL's in DBPro at the moment...
EDIT
get installed memory(1), Also confirmed when disabling sound ports...
But I think I have seen this issue outside Enhancements Pack, I could be wrong again but hope I helped here...
Again you could perform this check for installed memory using system DLL's there is actually one that is capable of checking for above 4096 on systems that have more than this using a batch file, cannot remember who posted it but I am sure it is inside the last 250 posts on DBPro discussion board... so check the last 300 for Memory related posts, I tried but failed to find it so up to you...
But I did find this post
http://forum.thegamecreators.com/?m=forum_view&t=122729&b=1 which might help somewhat... by accessing the registry...
found that link using "using a DLL to read system memory" it was the first result for me...