Jump to content
  • Announcements

    • AndalayBay

      Orphan Attachments   07/31/2018

      I have been doing some housekeeping lately and I've noticed that I had a lot of orphaned attachments. Attachments get orphaned when the PM or post is deleted without removing the attachment first. Deleting a PM or post does not delete the attachment and the file or image remain on the server. I'd like to ask all members to go through their attachments and delete any attachments you don't need anymore or those that have been orphaned. Where can I get a list of my attachments? Click on your display name in the upper right corner of the forums and pick "My Attachments" from the drop-down list. How can I tell an attachment is orphaned? If the PM has been deleted, you'll see a message like this in your attachment list: Unfortunately there is no message if the post has been deleted, so please check your old posts. We do purge old birthday threads every once in a while. Also some hosted projects have been shut down, so you may have orphaned attachments on one of those locations. Thanks!
Sign in to follow this  
Schtearn

[Relz] Bigger Directories

Recommended Posts

As you might well know, games (and other things :P ) are getting bigger and bigger and bigger.

 

Sooner or later, Windows_Users will run into the MAX_PATH barrier in the process of modding their games (and other things :P ).

 

Many programs are using the DWORDMAX, or 32k limit, but the Explorer Shell is hampered by the MAX_PATH limitation. You only get to know this when attempting to manually copy or delete files from directories using explorer.

So this is where Bigger Directories chimes in.

 

Want to copy to or delete a file in a folder explorer can't? Well you can now.

Want to create or delete a folder explorer can't? Well, it's possible.

 

This is done with an antiquated DialogeEx with Listbox Theme. Why? Because a certain person may have been under the impression that MAXPATH ought to be enough for anybody, as was claimed 640k ought to be enough for anybody. (Note the 1995 attribution on that page "The internet is just a passing fad")

 

Well, hoo, hoo to all that, because now cop a load of this:

 

BIgger Directories ought to be enough for anyone. -lmstearn

 

Like it or leave it?

 

Download.

 

Thanks to VM for testing on MinGW G++.

 

Issues: Windows 10 Users will get a Smartscreen popup. Select "More Info" and "Run Anyway". (Weird because the same file sitting in the Release deployment directory doesn't get the alert)

Edited by lmstearn

Share this post


Link to post
Share on other sites
  • Initial Release
  •  
  • Version 1.1: Support for all drives.
  • Version 1.11
  • Error moving up directory fixed
  • greyed out numbers box fixed
  • Version 1.12
  • Fixed refresh on Create & Delete
  • Minor bugs addressed
  • Version 1.13
  • Added Version Info
  • Fixed refresh after Create & Delete (again)
  • Minor bug fixes
  • Version 1.14
  • Fixed Handle Bug in Kleenup
  • Fixed Userinit key rename
  • Version 1.2
  • Form visibility load issues
  • Better path checking & error trapping
  • Long path aware in manifest
  • DPI aware
  • Improved directory navigation status
  • Stability Issues addressed
  • Now Runs in Windows XP (SP3)
  • Version 1.2.1
  • Fixed (yet another) critical deletion error
  • Version 1.2.2
  • Fixed issue with Drag & Drop hidden folders
Edited by Schtearn

Share this post


Link to post
Share on other sites

Yep, gonna have to try that sometime soon as downloading the file from here gets a virus FP from Windows defender. One has to turn defender off to actually D/L the thing on 8.1. :blink:

Share this post


Link to post
Share on other sites

My bad? The defender virus suddenly updated and the file downloads. I hate defender, why don't they go back to MSE?

Thanks. :) Most of the solutions involve running the signtool from the post build step. Ideally we have to establish a chain of trust, but without paying hundreds of dollars p.a.. :P

Share this post


Link to post
Share on other sites

A rather odd situation occurred when OpenProcess did not return a handle after porting Bigger Directories from the W10 Pro (1607) machine. hProcessName filled in every case there. On the W10 Pro (1607) machine the hProcessName filled when run from the IDE but when run as a standalone it didn't. Choosing compatibility options for the program and running as Admin did not work either. No similar problem was detected on the previous W7 Home install.

A little odd (*GetCurrentProcessId* aside) when one couldn't even grab a handle on one's own executable.

        if (0 == wcscmp(processName, pe32.szExeFile))
        {
            result = pe32.th32ProcessID;
   hProcessName = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, pe32.th32ProcessID);
   if(!hProcessName)
    {
     //GetLastError (Access is Denied) and Exit code
    }
            break;
        }

If there was an issue with ACLs then a Group Policy solution might work if it were a Pro machine, but what to be done on a Home ed?

Searched through the registry for the app- came up with some paths that might shed some light:

  HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Compatibility Assistant\Store
  HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers
  HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\RADAR\HeapLeakDetection\DiagnosedApplications\BiggerDirectories.exe
  HKEY_USERS\S-1-5-21-3723142744-2120397182-728992050-1000\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Compatibility Assistant\Store
  HKEY_USERS\S-1-5-21-3723142744-2120397182-728992050-1000\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers

Also tried various UAC twiddles & various compile options, but a reboot fixed it! The only explanation is that something fouled up somewhere and an unclosed mutex was causing a race condition.

Share this post


Link to post
Share on other sites

Think so. Tried all sorts of things to reproduce- even attempting to run more than one instance and cancelling through task manager, but nothing. Perhaps an issue with VS10 running in W10- who knows?

Share this post


Link to post
Share on other sites

Not yet,- but it might not be that in any case-

This behaviour might be attributed to any of the bequests of installing W10 with the option of retaining the settings of the previous OS.

Moreover, there could be gremlins upsetting basic functions of the OS- see the rant over at Hardware.

Edited by Schtearn

Share this post


Link to post
Share on other sites

This is a circular catch 22.
Trying to get this to run in XP SP13 32 bit but for the:

The procedure entry point Wow64RevertWow64FsRedirection could not be located in the dynamic link library Kernel32.dll

Problem is, it's not getting past the decs:- specifically:

typedef BOOL (__stdcall *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL); 

and-

typedef BOOL (__stdcall *LPFN_Wow64RevertWow64FsRedirection) (_In_ PVOID OldValue);
typedef BOOL (__stdcall *LPFN_Wow64DisableWow64FsRedirection) (_Out_ PVOID *OldValue); 

Although the latter two were put in after the above error. But these typedefs are mandatory if one wishes to find whether the functions exist in the XP SP23 32 kernel32 lib with LoadLibrary and GetProcAddress. Which they aren't, of course, but how can it be coded without these typedefs?

Or do we just do a separate 32 bit build for it without the WoW64 stuff- but that's awful.: (

Edit: There might be something in preprocessing. But this is all we have?

Identification _WIN16 Defined for 16-bit environments 1

Identification _WIN32 Defined for both 32-bit and 64-bit environments 1
Identification _WIN64 Defined for 64-bit environments 1
Identification __WIN32__ Defined by Borland C++
Identification __TOS_WIN__ Defined by xlC
Identification __WINDOWS__ Defined by Watcom C/C++
Edited by Schtearn

Share this post


Link to post
Share on other sites

Slept on it- the solution is the old practice of defining the functions in code. 

BOOL WINAPI Wow64RevertWow64FsRedirection(PVOID OldValue);

That way the OS gets the function it's expecting. :)

The function was referenced in the code under a condition. The condition was correct but the function was still there and behaved as if it was declared as extern. Followed Cody's method.

Edit: It's doing the same with ChangeWindowMessageFilterEx- Guessing the same technique applies- although there are a lot more parms.

Edited by Schtearn

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×