473,770 Members | 1,661 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

GetLocalPathNam e 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
GetLocalPathNam e 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_GETLONGPAT HNAME_WRAPPER
#include "NewAPIs.h"

But now I am getting the following error during compilation:

C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\Platfo rmSDK\Include\N ewAPIs.h(325) :
error C2440: '=' : cannot convert from 'BOOL (__stdcall
*)(LPCTSTR,LPTS TR,DWORD)' to
'DWORD (__stdcall *)(LPCTSTR,LPTS TR,DWORD)'
This conversion requires a reinterpret_cas t, 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 2187
On Thu, 17 Feb 2005 09:47:08 -0800, "Boris"
<Bo***@discussi ons.microsoft.c om> 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
GetLocalPathNa me 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_GETLONGPAT HNAME_WRAPPER
#include "NewAPIs.h"

But now I am getting the following error during compilation:

C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\Platf ormSDK\Include\ NewAPIs.h(325) :
error C2440: '=' : cannot convert from 'BOOL (__stdcall
*)(LPCTSTR,LPT STR,DWORD)' to
'DWORD (__stdcall *)(LPCTSTR,LPTS TR,DWORD)'
This conversion requires a reinterpret_cas t, 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
2205
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 symbol files for the GDI32.dll, kernel32.dll..... and all the other dll's properly. While debugging i want to see what is happening in GDI32 behind the scene. Is there a way? If not then why do we load the GDI32.pdb for debugging. Thanks,...
2
7817
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 able to edit .ini files with some VB code that references that library. Does anyone know how to do this from access? Thanks for your help!
3
5823
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 lpNumberOfBytesRead, IntPtr lpOverlapped);
3
3009
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 up, and it still does not compile. Any ideas? Thanks! -Mark ** THESE TWO DO NOT WORK *** Private Declare Sub GetSystemInfo Lib "kernel32" (lpSystemInfo As SYSTEM_INFO) Private Declare Function GetVersionEx Lib "kernel32" Alias "GetVersionExA"
2
4458
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 written in vb.NET. I've rewritten the code for vb.net, but if I run the application, there is following runtime error message System.NullReferenceException: Object reference not set to an instance of an object. at...
0
1089
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 EFLGS=00000206 EBX=81d10cbc SS=0187 ESP=07fbfc88 EBP=07fbfe38 ECX=00000187 DS=0187 ESI=81d10cbc FS=130f
0
877
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 KERNEL32.DLL at 017f:bff768a1. Registers: EAX=00000000 CS=017f EIP=bff768a1 EFLGS=00000247
1
3601
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 some files and work on it. Let say, I want add new page to web project named websiteOrder.sln, i will open websiteOrder.sln in my local computer, connected to websiteOrder.sln located in Visual Source Safe 6.0(source safe located in another...
6
3812
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, string defaultValue, byte result, int size, string fileName); private static extern int GetPrivateProfileString(string section, string key, string defaultValue, StringBuilder result, int size, string fileName);
0
9595
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
10008
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9873
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8891
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7420
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6682
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5454
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3974
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3578
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.