News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Missing export

Started by Roger, April 11, 2009, 03:59:34 PM

Previous topic - Next topic

Roger

Hi All,

I am have a problem which produces the following run time error message:-

    The SETUPAPI.DLL file is linked to missing export NTDLL.DLL:NtClose

This makes no sense to me as it seems to be out of context with what I am doing.

I assembled and linked with the following:-


\GoAsm\bin\GoAsm /x86 USBtestC.asm
\GoAsm\bin\GoLink /console hid.dll setupapi.dll USBtestC.obj


With XP it assembled, linked, loaded and ran - ready for debugging!
With Win98 I got the above error message as it tried to load.
My XP does not have NTDLL.DLL.  Win98 has it and won't let me rename it as it is in use.
I am using the same version of SETUPAPI.DLL - I had to copy it specially from the Platform SKD to both systems.

I can't see why it is OK if it is not present but when it is present, there are complaints that bits of it are missing.

Regards Roger

Mark Jones

Quote from: Roger on April 11, 2009, 03:59:34 PM
My XP does not have NTDLL.DLL.  Win98 has it and won't let me rename it as it is in use.

This seems suspect. My XP Pro SP3 has:

X:\WINDOWS>dir /s ntdll.dll
Volume in drive X is 98GB NTFS
Volume Serial Number is D4X4-37A9

Directory of X:\WINDOWS\$NtServicePackUninstall$

08/04/2004  01:56 AM           708,096 ntdll.dll
               1 File(s)        708,096 bytes

Directory of X:\WINDOWS\ServicePackFiles\i386

04/13/2008  08:11 PM           706,048 ntdll.dll
               1 File(s)        706,048 bytes

Directory of X:\WINDOWS\system32

04/13/2008  08:11 PM           706,048 ntdll.dll
               1 File(s)        706,048 bytes

     Total Files Listed:
               3 File(s)      2,120,192 bytes
               0 Dir(s)  15,697,989,632 bytes free
"To deny our impulses... foolish; to revel in them, chaos." MCJ 2003.08

donkey

ntdll.dll is the core file for all Windows versions, it provides the facility to remap almost every Win9x function for use with WinNT. It is installed with every version of Windows NT+ and Windows would not even load without it so there is no question that the DLL exists and is located in your \windows\system32 folder. For the NtClose function, it is deprecated however it is still exported from the DLL both by name and ordinal (111).

"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

Roger

Hi Mark, Hi Donkey,

Thank you for your replies. Using 'dir' rather than clicking on search has found NTDLL.DLL and suprise suprise I have them exactly as Mark has.

The interesting thing is that it is 708 Kbytes whereas the Win98 version is only 20K bytes. Bloat Rules OK!

It seems to be a version issue so I am going to have to look for a Win 98 version of SETUPAPI.DLL to see if that resolves my problem.

Regards Roger

PS On this exhaustive sample of 1 item, Bloat seems to be outpacing Moore's Law by a factor of about 1.3 :'(

Relvinian

Quote from: Roger on April 11, 2009, 07:04:25 PM
Hi Mark, Hi Donkey,

Thank you for your replies. Using 'dir' rather than clicking on search has found NTDLL.DLL and suprise suprise I have them exactly as Mark has.

The interesting thing is that it is 708 Kbytes whereas the Win98 version is only 20K bytes. Bloat Rules OK!

It seems to be a version issue so I am going to have to look for a Win 98 version of SETUPAPI.DLL to see if that resolves my problem.

Regards Roger

PS On this exhaustive sample of 1 item, Bloat seems to be outpacing Moore's Law by a factor of about 1.3 :'(

The reason the Win98 version of NTDLL.DLL is much shorter is because it is just a "stub" for translating API calls to the correct Win98 equivalent. In NT4 and higher, the NTDLL.DLL actually contains the code needed.  ;-)

Relvinian