PDA

View Full Version : I'm back with a new DLL :)


CrazyFrog
11-22-2007, 12:22 PM
Hi guys, sorry for my huge innactivity..I have now Internet at my home and I can spend more time on this forum :)
I have made a small dll with Pb and it has one function : ListFiles
Bassically it searches for a file in the folder you specify (e.g : d:\\ ) more fast than the File.Find command.It searches through other folders on d:\\ also.

The ListFiles Function has 4 parameters :
-The directory to search
-The name of the file
-The extension
- another parameter that needs to be "0"
e.g. :
DLL.CallFunction("D:\\SeaFile.dll","ListFiles","\""..directory.."\""..",".."\""..file.."\""..",".."\""..extension.."\""..","0, DLL_RETURN_TYPE_STRING, DLL_CALL_STDCALL);

i've attached the dll file

mindstitchdr
11-23-2007, 11:37 AM
Hey CrazyFrog, I've would love to use this but I can't seem to figure out how to use it. I copied and pasted your action and it gives me an error.

')' expected near '0'

Could you possibly through together a quick sample? Also could this be used with the Progress Bar Object?

Haydeng
11-23-2007, 08:29 PM
Use this:

DLL.CallFunction("D:\\SeaFile.dll","ListFiles","\""..directory.."\""..",".."\""..file.."\""..",".."\""..extension.."\""..","0"), DLL_RETURN_TYPE_STRING, DLL_CALL_STDCALL);

He mistyped and forgot a closing parentheses next to the "0".

mindstitchdr
11-23-2007, 08:35 PM
Thanks for the reply Haydeng, but I still get the exact same error.

CrazyFrog
11-23-2007, 10:19 PM
ohh...sry...i've forgot
You need to define the "0" thing as a string .
Use this:
ID = "0"
DLL.CallFunction("D:\\SeaFile.dll","ListFiles","\""..directory.."\""..",".."\""..file.."\""..",".."\""..extension.."\""..","..ID, DLL_RETURN_TYPE_STRING, DLL_CALL_STDCALL);

Hope this would help

mindstitchdr
11-23-2007, 10:28 PM
Thanks for the help CrazyFrog. What do I need to use as the return for this?

CrazyFrog
11-23-2007, 10:31 PM
The function will return the full path to the file that was find.
In the future I hope to update the dll for multiple file searches.

Solmos
11-24-2007, 12:25 AM
for multiple file searches

:wow:yes:yes:yes:yes:yes

mindstitchdr
11-24-2007, 10:17 AM
Thanks for the help (And the DLL) CrazyFog!

jackdaniels
11-25-2007, 04:42 AM
can anyone give a small example with this dll please ???

CrazyFrog
11-25-2007, 07:36 AM
Ok , I've made a little example for you.

I've attached the .apz file

Some tips :
1. the folder can be either in format " d:\ " or " d:\\ "
2. the filename and the extension MUST be in lowercase
3. the extension must NOT have the "dot" in front : e.g : "exe" "dll"

CrazyFrog
11-30-2007, 03:01 PM
First update for Misc-OCX plugin ( 1.1.0.0 ) will be released on sunday , 2 December 2007 , with 15 new functions amd the next release of SeaFile.DLL will happen next week...
Have a fun Coding....