fabsetr.blogg.se

Xojo delete cache
Xojo delete cache





xojo delete cache

In conclusion, while it’s a lot of work to set this up, it has the added benefit over the other options in that it is more extensible/customizable on the Windows platform. This is how we cast a Ptr to a COM object to be released Delegate Function PerformOperation(this As Ptr) As Integerĭim performOpFunc As New PerformOperation( Result = deleteItemFunc.Invoke(fileOp, shellItem, Nil) shellItem As Ptr, progressSink As Ptr) As Integerĭim deleteItemFunc As New DeleteItem(fileOp.Ptr(0).Ptr(18 * sizeOfPtr)) Delegate Function DeleteItem(this As Ptr, Result = setOpFlagsFunc.Invoke(fileOp, FOF_NO_UI) Delegate Function SetOperationFlags(this As Ptr,ĭim setOpFlagsFunc As New SetOperationFlags( _ and PerformOperation as delegates with the correct I've setup SetOperationFlags, DeleteItem, It can also be gathered by looking at the COM component's known (mainly because I have the C headers for them).

xojo delete cache

Since fileOp is just a list of function pointers, we need Nil, COM.CLSCTX_SERVER, IID_IFileOperation, fileOp) Result = COM.CoCreateInstance(CLSID_FileOperation, _ Basically it will hold a list of function pointers to call fileOp will be how we communicate with the COM component. Result = SHCreateItemFromParsingName(f.NativePath, _ Normally you would use Project->Add ActiveX component toĭim CLSID_FileOperation As MemoryBlock = _ĬOM.IIDFromString("") So, I made a little IDE Script to make this task easier. they are typically only exposed by C headers or in the type I've had some trouble lately caused by the incremental compiling cache, especially after updating a plugin 1. Unfortunately finding the IIDs is not as simple since These IIDs identify the COM object that we're looking for. (path As WString, pbc As Ptr, riid As Ptr, Byref ppv As Ptr) As Integer This fix enables to use to 500 MBS Plugin DLLs if needed and still have room in both tables for other plugins and Xojo itself. Our one declare that creates our ShellItemĭeclare Function SHCreateItemFromParsingName Lib "Shell32" _ So for Xojo 2017r3 on Windows, you will definitively need our 17.5 plugins with the fix. However, it is also the slightly more complicated option since it deals with COM & Delegates. I’ve decided to look at option #4, since this allows more customized options, like the ability to show a progress dialog. IFileOperation (the more modern API that Windows recommends over option #3) “del /s” on Windows, or “rm -rf” on OS X and Linux)Ĥ. Use the Shell to recursively delete a folder (i.e. You can read about that at our Developer Site, this is the best cross-platform way.Ģ. Recursively iterate through all the folders, deleting each one. While Xojo doesn’t currently provide a direct way of recursively deleting a folder, there are various options that will allow you to do this:ġ.







Xojo delete cache