471,120 Members | 1,329 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,120 software developers and data experts.

GetLocalPathName could not be located in Kernel32.dll

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/de...ngpathname.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?

Thanks
Nov 17 '05 #1
1 2081
On Thu, 17 Feb 2005 09:47:08 -0800, "Boris"
<Bo***@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/de...ngpathname.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
Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by John Sheppard | last post: by
3 posts views Thread by Chua Wen Ching | last post: by
3 posts views Thread by Mark Field | last post: by
2 posts views Thread by Jan Jeitziner | last post: by
reply views Thread by Mullai | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.