due to Windows 95/NT not supporting it). However, using the OpenLibrary
functions you can pretty much use any API you want (even if PureBasic
doesn't support it), so here's an example of emptying the Recycle Bin:
Code: Select all
Procedure EmptyTrash(confirm)
If OpenLibrary(0,"shell32.dll") And IsFunction(0,"SHEmptyRecycleBinA")
CallFunction(0,"SHEmptyRecycleBinA",0,"",1-confirm)
CloseLibrary(0)
EndIf
EndProcedure
EmptyTrash(1) ; 1 = confirm with user first, 0 = don't confirm.
with the following code. However, note that this code doesn't list the
required parameters for each API function, so you may need to do a bit
of Google searching (or whatever) to find out.
Code: Select all
If OpenLibrary(0,"shell32.dll") ; Name of DLL to browse.
If ExamineLibraryFunctions(0)
While NextLibraryFunction()
Debug LibraryFunctionName()
Wend
EndIf
CloseLibrary(0)
EndIf
