473,320 Members | 1,831 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 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 2161
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Saurabh Aggrawal | last post by:
Hi, I am in the process of debugging a 32 bit driver in user mode. I am debugging a dll( printer UI) which internally uses the GDI32.dll. I am using the Windbg for debugging. Windbg is loading the...
2
by: John Sheppard | last post by:
Hi, Im wanting to add kernel32.dll to my references, but it says cant add reference to the specified file. Does anyone know why? or shouldnt I even be trying to do such a thing? I want to be...
3
by: Chua Wen Ching | last post by:
Hi, I have doubts. From p/invoke and most site, they recommend to use this. Example1: static extern bool ReadFile(IntPtr hFile, byte lpBuffer, uint nNumberOfBytesToRead, out uint...
3
by: Mark Field | last post by:
When I insert the code below, it claims that there is a User Defined Type Not Defined. In the cases below, it's refering to SYSTEM_INFO and OSVERSIONINFO. I have matched the reference libraries...
2
by: Jan Jeitziner | last post by:
I want to find out all dll's a process have. I've found example code on the page http://www.freevbcode.com/ShowCode.asp?ID=295 The problem is, the sample is written in vb6, but Application is...
0
by: Mullai | last post by:
0Hi, My exe comes out with two types of errors like : 1.PG1609VV caused an invalid page fault in module KERNEL32.DLL at 017f:bff9dfff. Registers: EAX=07fbfe38 CS=017f EIP=bff9dfff...
0
by: Mullai | last post by:
Hi Friends, My exe gives an error msg like Exception 03H in module KERNEL32.DLL very often. I am working in VC++ 6.0 ver, mfc and gdi plus. PG1609VZ caused an exception 03H in module...
1
by: johnlim20088 | last post by:
Hi, Currently I have 6 web projects located in Visual Source Safe 6.0, as usual, everytime I will open solution file located in my local computer, connected to source safe, then check out/check in...
6
by: alag20 | last post by:
Hi Guys, I need some urgent help with this as I am becoming clueless now. I have 2 DllImport as below from Kernel32 private static extern int GetPrivateProfileString(string section, int key,...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.