Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

"PATH SYNTAX BAD" error when loading a dependent DLL of a Windows 7 application on a UNC path


View products that this article applies to.

Symptoms

Consider the following scenario:
  • You have an application that loads a DLL that has a dependency on a second DLL. 
  • You run the application on a Windows 7-based computer.
  • Your current working directory is a UNC path.
 In this scenario, the dependent DLL fails to load, and a "PATH SYNTAX BAD" error is generated.

↑ Back to the top


Cause

This issue occurs because, when the application searches the UNC path for the dependent DLL, the path for the current directory and the first path element are combined incorrectly.  

The following is an example of a path that is combined incorrectly:
\\Client\;U:000000003129b4db\FolderA\SubfolderA\ "c:\testing\FolderB\SubfolderB"\dlxapi64.dll  

↑ Back to the top


Resolution

To resolve this issue, remove the quotation marks from the first entry of the path statement. 

In previously mentioned example path, you would remove the quotation marks from the  "c:\testing\FolderB\SubfolderB string.

↑ Back to the top


Keywords: kbsurveynew, kbexpertiseadvanced, kbprb, kb

↑ Back to the top

Article Info
Article ID : 2652697
Revision : 1
Created on : 1/7/2017
Published on : 10/11/2013
Exists online : False
Views : 202