NO

Author Topic: Are the _findfirst64 and _findnext64 functions DEPRECATED?  (Read 7230 times)

Offline Robert

  • Member
  • *
  • Posts: 247
Are the _findfirst64 and _findnext64 functions DEPRECATED?
« on: July 31, 2020, 04:55:41 AM »
The _findfirst and _findnext functions are DEPRECATED.

Are the _findfirst64 and _findnext64 functions DEPRECATED?

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: Are the _findfirst64 and _findnext64 functions DEPRECATED?
« Reply #1 on: July 31, 2020, 12:23:52 PM »
The _findfirst and _findnext functions are DEPRECATED.

Are the _findfirst64 and _findnext64 functions DEPRECATED?

I decided to deprecate _findfirst() and _findnext() in Pelles C. With ANSI and Unicode version, 32-bit and 64-bit file size version, and now 32-bit and 64-bit time version, it turned into waaaay too many variations of the same. It should be a simple/mechanical change to use _findfirst64()/_findnext64() instead of _findfirst()/_findnext().
/Pelle

Offline John Z

  • Member
  • *
  • Posts: 860
Re: Are the _findfirst64 and _findnext64 functions DEPRECATED?
« Reply #2 on: August 01, 2020, 06:19:43 PM »
Robert,

It is pretty easy to do, I've done it.  The only other thing you'll need to be aware of is that the size element in the structure changed from returning unsigned long int  to returning unsigned long long int.  Otherwise search and replace  :).

Regards,
John

Offline bitcoin

  • Member
  • *
  • Posts: 179
Re: Are the _findfirst64 and _findnext64 functions DEPRECATED?
« Reply #3 on: September 12, 2020, 09:12:36 PM »
Hello,
What is this functions? Is this wrappers around Winapi or what?
And what means deprecated? I can't use it in my programs or this is only warnings (MSVC deprecated lstrcat, but I can use it).

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: Are the _findfirst64 and _findnext64 functions DEPRECATED?
« Reply #4 on: September 13, 2020, 05:12:39 PM »
What is this functions? Is this wrappers around Winapi or what?
Tiny wrappers around FindFirstFile(), FindNextFile() ...

And what means deprecated?
"Outdated" / "Not to be used anymore" / ...
/Pelle

Offline John Z

  • Member
  • *
  • Posts: 860
Re: Are the _findfirst and _findnext functions DEPRECATED?
« Reply #5 on: September 13, 2020, 11:00:27 PM »
And what means deprecated? I can't use it in my programs or this is only warnings (MSVC deprecated lstrcat, but I can use it).

Bitcoin - depreciated functions will usually work for a while after first being marked as 'depreciated'.  This is to give time to those using the function to change to whatever the replacement is if any.  Functions such as lstrcat, or in this case _findfirst and _findnext could be removed in any following version after being marked as depreciated.  So being marked depreciated is a warning that the function may not exist in future versions even though it may still work in the current version.

Regards,
John Z