Hi Bob,
Can you tell me your OS version? If it is Vista, do you enable UAC, do you
run your application elevated?
This sounds like an interesting issue. With current information, it is hard
for me to say the root cause, but I suspect it may has something to do with
the environment variables or user profile paths. When you login through
remote desktop, it may have different environment variables or profile
which may cause the application initialization failure. However, I am not
certain yet, we need to perform some troubleshooting to get close to the
root cause.
I assume you are getting a "The application failed to initialize
properly(0x0000005)" error dialog, yes? Based on my experience, the error
is usually caused by the initialization failure in DllMain of certain DLL
linked by your application directly or indirectly.
To troubleshoot this issue, we have several ideas. First, you may use the
Dependency Walker tool(depends.exe) to launch your application during
remote desktop logon. Try to find any dll that is reported as missing. This
may provide some useful information.
Second, you may use Process Explorer's "Find Window's Process" icon tool to
examine the owning process of the error dialog. We need to find out if the
error dialog is popped up by the failing application process or the
launching process(such as explorer.exe). I assume it is the failing process
first. Then, you may use the windbg to attach the failing process and
examine its stack trace. You may paste the stack trace here for analysis.
From kernel space perspective, the console&remote desktop are different
user sessions, so they will have different session view in kernel space.
The main difference are the GUI/GDI graphic functions. Is your application
very dependant on the GUI/GDI operations? Is it possible that the desktop
heap is exhausted? You may use "Desktop Heap Monitor tool" to check this.
See the article below for more details:
http://blogs.msdn.com/ntdebugging/archive/2007/01/04/desktop-heap-overview.a
spx
Finally, you may use Process Monitor to examine the file system®istry
activity of your application startup period. You may filter the "SUCCESS"
result and pay more attention to the "NOT FOUND" or other failure records.
I will wait for more information from you. Thanks.
Best regards,
Jeffrey Tan
Microsoft Online Community Support
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.