Driver Problems? Questions? Issues?
Put OSR's experience to work for you! Contact us for assistance with:
  • Creating the right design for your requirements
  • Reviewing your existing driver code
  • Analyzing driver reliability/performance issues
  • Custom training mixed with consulting and focused directly on your specific areas of interest/concern.
Check us out. OSR, the Windows driver experts.

OSR Seminars


Go Back   OSR Online Lists > ntfsd
Welcome, Guest
You must login to post to this list
  Message 1 of 3  
06 Jul 18 13:25
Kunal
xxxxxx@hotmail.com
Join Date: 13 Jun 2017
Posts To This List: 4
FindNextFile failing with error ERROR_INVALID_FUNCTION

Hi, I have been using FindNextFile() to enumerate all files in a folder. It will enumerate all the files until FindNextFile() fails with error ERROR_NO_MORE_FILES. There has been no changes in this part of code and it has been working fine all these years, but in one of my customers' machine (windows server 2016) it returns error (getlasterror) ERROR_INVALID_FUNCTION. What does it mean and how should I handle it? Thanks, Kunal
  Message 2 of 3  
08 Jul 18 08:17
rod widdowson
xxxxxx@steadingsoftware.com
Join Date: 11 Sep 2006
Posts To This List: 865
FindNextFile failing with error ERROR_INVALID_FUNCTION

> What does it mean and how should I handle it? Your filter (or whatever) or something else has started returning STATUS_INVALID_FUNCTION. Promon is your friend. Fire that up, find the precise IRP that causes the problem and start reading code (or debugging it) Rod
  Message 3 of 3  
09 Jul 18 15:13
Scott Noone
xxxxxx@osr.com
Join Date: 10 Jul 2002
Posts To This List: 1026
List Moderator
FindNextFile failing with error ERROR_INVALID_FUNCTION

Rod is spot on about running Process Monitor. However, just wanted to point out that multiple native status codes can translate to ERROR_INVALID_FUNCTION. According to winerror.exe: 1 ERROR_INVALID_FUNCTION <--> 0xc0000002 STATUS_NOT_IMPLEMENTED 1 ERROR_INVALID_FUNCTION <--> 0xc0000010 STATUS_INVALID_DEVICE_REQUEST 1 ERROR_INVALID_FUNCTION <--> 0xc000001c STATUS_INVALID_SYSTEM_SERVICE 1 ERROR_INVALID_FUNCTION <--> 0xc00000af STATUS_ILLEGAL_FUNCTION 1 ERROR_INVALID_FUNCTION <--> 0xc000029c STATUS_VOLUME_NOT_UPGRADED 1 ERROR_INVALID_FUNCTION <--> 0xc0000710 STATUS_CALLBACK_RETURNED_WHILE_IMPERSONATING 1 ERROR_INVALID_FUNCTION <--> 0xc0000711 STATUS_APC_RETURNED_WHILE_IMPERSONATING 1 ERROR_INVALID_FUNCTION <--> 0xc000071b STATUS_CALLBACK_RETURNED_THREAD_PRIORITY 1 ERROR_INVALID_FUNCTION <--> 0xc000071d STATUS_CALLBACK_RETURNED_TRANSACTION 1 ERROR_INVALID_FUNCTION <--> 0xc000071e STATUS_CALLBACK_RETURNED_LDR_LOCK 1 ERROR_INVALID_FUNCTION <--> 0xc000071f STATUS_CALLBACK_RETURNED_LANG 1 ERROR_INVALID_FUNCTION <--> 0xc0000720 STATUS_CALLBACK_RETURNED_PRI_BACK 1 ERROR_INVALID_FUNCTION <--> 0xc0000721 STATUS_CALLBACK_RETURNED_THREAD_AFFINITY 1 ERROR_INVALID_FUNCTION <--> 0xc0010001 DBG_NO_STATE_CHANGE So you'll want to look for any of those in the Process Monitor output. -scott OSR @OSRDrivers
Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You must login to OSR Online AND be a member of the ntfsd list to be able to post.

All times are GMT -5. The time now is 19:19.


Copyright ©2015, OSR Open Systems Resources, Inc.
Based on vBulletin Copyright ©2000 - 2005, Jelsoft Enterprises Ltd.
Modified under license