Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8902675
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T01:40:24+00:00 2026-06-15T01:40:24+00:00

I deployed an CGI DLL built with Delphi 2007 on the Windows 2008 server.

  • 0

I deployed an CGI DLL built with Delphi 2007 on the Windows 2008 server. Internally I need to use the current DLL path.

Normally I can use GetModuleFileName or GetModuleName, but on the server they both return:

\\?\c:\my\correct\path

Why the first 4 characters? It looks like a network path? Is there any way to exclude those first 4 characters?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T01:40:25+00:00Added an answer on June 15, 2026 at 1:40 am

    The pertinent documentation is this:

    Maximum Path Length Limitation

    In the Windows API (with some exceptions discussed in the following
    paragraphs), the maximum length for a path is MAX_PATH, which is
    defined as 260 characters. A local path is structured in the following
    order: drive letter, colon, backslash, name components separated by
    backslashes, and a terminating null character. For example, the
    maximum path on drive D is “D:\some 256-character path string”
    where “” represents the invisible terminating null character for
    the current system codepage. (The characters < > are used here for
    visual clarity and cannot be part of a valid path string.)

    Note File I/O functions in the Windows API convert “/” to “\” as part
    of converting the name to an NT-style name, except when using the
    “\\?\” prefix as detailed in the following sections.

    The Windows API has many functions that also have Unicode versions to
    permit an extended-length path for a maximum total path length of
    32,767 characters. This type of path is composed of components
    separated by backslashes, each up to the value returned in the
    lpMaximumComponentLength parameter of the GetVolumeInformation
    function (this value is commonly 255 characters). To specify an
    extended-length path, use the “\\?\” prefix. For example, “\\?\D:\very
    long path”.

    Note The maximum path of 32,767 characters is approximate, because
    the “\\?\” prefix may be expanded to a longer string by the system at
    run time, and this expansion applies to the total length.

    The “\\?\” prefix can also be used with paths constructed according to
    the universal naming convention (UNC). To specify such a path using
    UNC, use the “\\?\UNC\” prefix. For example, “\\?\UNC\server\share”,
    where “server” is the name of the computer and “share” is the name of
    the shared folder. These prefixes are not used as part of the path
    itself. They indicate that the path should be passed to the system
    with minimal modification, which means that you cannot use forward
    slashes to represent path separators, or a period to represent the
    current directory, or double dots to represent the parent directory.
    Because you cannot use the “\\?\” prefix with a relative path,
    relative paths are always limited to a total of MAX_PATH characters.

    As long as you are calling Unicode versions of Windows API functions, then there’s no need to strip the "\\?\" prefix. Because the path that you have been handed is a valid path.

    As we discovered in the comments, you were calling an ANSI version of an API function. And when you do that, the "\\?\" prefix is not valid. So, stick to Unicode API functions and it’s all good!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Visual Studio 2010 .Net framework 4.0 IIS 7.0 Windows Server 2008 within a visual
I deployed a Symfony2 application on my server and I wanted to disable some
I deployed my MVC application in our IIS server. When I go to registration
I deployed a JAX-WS Service and use wsimport to generate client code. Because I
I deployed my application in Tomcat and the application path is: http://localhost:8080/myapp but I
I deployed my web application created with visual studio 2010 to a remote server
i deployed a jruby/rails app to tomcat6 through a warbler-built war. system is ubuntu
I deployed a MATLAB project into a DLL, to be called from C++, and
I deployed node.js to Amazon EC2 Windows instance. Here is the js code which
I deployed my webapp, created in asp.net, to testing server (win 2003 sp2, iis6).

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.