Re: GetLocalPathName could not be located in Kernel32.dll

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Severian (severian_at_chlamydia-is-not-a-flower.com)
Date: 02/18/05


Date: Fri, 18 Feb 2005 03:29:07 GMT

On Thu, 17 Feb 2005 09:47:08 -0800, "Boris"
<Boris@discussions.microsoft.com> wrote:

>I have C++ .NET mixed (managed/unmanaged) application.
>I build it under W2K and it works fine.
>
>However when I tried to run it under NT 4.0 I've got the
>following error message: The procedure entry point
>GetLocalPathName could not be located in the dynamic link
>library Kernel32.dll"
>
>Apparently this function is not implemented in Windows NT 4.
>
>I've found the following note in the description of
>the GetLongPathName function at:
>http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/getlongpathname.asp
>
>"Windows NT and Windows 95: Include an additional header file
>called NewAPIs.h to make GetLongPathName available on these operating
>systems. The function is not implemented natively, but by a wrapper
>that utilizes other native functions on these systems. See the header
>file for details of the use of preprocessor directives that make the
>function available. If you do not have this header file, it can be
>obtained by downloading the most recent SDK from the SDK Update Site."
>
>So I've added the following lines to my code:
>
>#define COMPILE_NEWAPIS_STUBS
>#define WANT_GETLONGPATHNAME_WRAPPER
>#include "NewAPIs.h"
>
>But now I am getting the following error during compilation:
>
>C:\Program Files\Microsoft Visual Studio .NET
>2003\Vc7\PlatformSDK\Include\NewAPIs.h(325) :
>error C2440: '=' : cannot convert from 'BOOL (__stdcall
>*)(LPCTSTR,LPTSTR,DWORD)' to
>'DWORD (__stdcall *)(LPCTSTR,LPTSTR,DWORD)'
>This conversion requires a reinterpret_cast, a C-style cast or
>function-style cast
>
>Can anyone advise how can I resolve this issue. On one hand the app doesn't
>run under NT 4, on another hand the Microsoft suggested solution doesn't
>compile under W2K?

It sounds like newapis.h was developed prior to VC 7.1 or 7.0; I would
try modifying newapis.h at line 325 and replace BOOL with DWORD.

--
Sev


Relevant Pages

  • Re: No output produced in latex
    ... LaTeX error it is. ... Reinstalling MikTeX completely may fix it, ... There is no error message in particular. ... compilation process just stops after a point. ...
    (comp.text.tex)
  • Proposal: Using the debugger or diagnostics should preload Carp::Heavy
    ... When perl runs using the debugger or if you "use diagnostics", ... Execution of -e aborted due to compilation errors. ... the problem with $num is reported correctly. ... the error message goes away. ...
    (comp.lang.perl.misc)
  • Re: intel compiler problem
    ... The error message seems ... Declarations are absolutely critical to diagnosing compilation ... Just seeing the isolated code line doesn't help ...
    (comp.lang.fortran)
  • Bug Report: Unclear Error Message
    ... When you by mistake have two properties with same id in dual interface in ... idl file the compilation fails and the error message does not point to the ...
    (microsoft.public.vstudio.general)
  • Re: Xmkmf/make problem
    ... > I have several Xlib programs that compiled successfully on earlier ... > get an error message: ... > It looks as though this header file, and several others, have been moved ... the best option is to fix the broken programs. ...
    (freebsd-questions)