Go Back   FlashFXP Forums > >

Programming Need help with C/C++/Delphi? Ask here and make us all laugh.

Closed Thread
 
Thread Tools Rate Thread Display Modes
Old 11-27-2003, 06:14 PM   #1
fr0z3n
Registered User
 
Join Date: Sep 2003
Posts: 46
Default userfile module

hey,

dark0n3 i know you don't have much time, but when you get a chance can you let me know what kinda of structure is needed for the module DLL? like what procedure is ioftpd looking for in the DLL?

maybe this is pushing it a bit... not sure but a small example (don't need much, just the basics pretty much) would be awesome :banana:

thanks in advance,
fr0z3n
fr0z3n is offline  
Old 11-27-2003, 06:51 PM   #2
darkone
Disabled
FlashFXP Registered User
ioFTPD Administrator
 
darkone's Avatar
 
Join Date: Dec 2001
Posts: 2,230
Default

http://www.ioftpd.com/board/showthre...?threadid=1952

Initialization routine name is given there + external modules work in similar fashion as io's built-in "modules". Structures, function prototypes etc. are available in source\include.

Btw. Prefer TCHARs over CHARs...
darkone is offline  
Old 11-29-2003, 09:35 AM   #3
fr0z3n
Registered User
 
Join Date: Sep 2003
Posts: 46
Default

hey,

have one more question... been having trouble linking with the ioFTPD sources... I asked in IRC chan yesterday but seems no one used the sources before . Mouton suggested that should use GetProcAddress() on the ioFTPD binary but when I attempt such thing it seems to crash..., and the functions don't look like they're supposed to be resolved through GetProcAddress.

Code:
error LNK2001: unresolved external symbol "int __cdecl FragmentFree(void *)" (?FragmentFree@@YAHPAX@Z)
error LNK2001: unresolved external symbol "char * __cdecl Config_Get_Path(char *,char *,char *,char *)" (?Config_Get_Path@@YAPADPAD000@Z)
error LNK2001: unresolved external symbol "void __cdecl DataRow_ParseBuffer(char *,unsigned long,void *,struct _DATAROW *,unsigned long)" (?DataRow_ParseBuffer@@YAXPADKPAXPAU_DATAROW@@K@Z)
 error LNK2001: unresolved external symbol "void __cdecl DataRow_Dump(struct _BUFFER *,void *,struct _DATAROW *,unsigned long)" (?DataRow_Dump@@YAXPAU_BUFFER@@PAXPAU_DATAROW@@K@Z)
error LNK2001: unresolved external symbol "void * __cdecl FragmentAllocate(unsigned long)" (?FragmentAllocate@@YAPAXK@Z)
was there supposed to be a static library or anything that we're supposed to link for the location of these methods?

... or am i missing something
would appreciate if you could clarify the situation

TIA,
fr0z3n
fr0z3n is offline  
Old 12-01-2003, 07:37 PM   #4
darkone
Disabled
FlashFXP Registered User
ioFTPD Administrator
 
darkone's Avatar
 
Join Date: Dec 2001
Posts: 2,230
Default

You can't directly compile this... DataRow_ commands are text parser/formatting routines, code for them is irrelevant. Here's current list of available procedures: (prototypes can be found from header files)

// Memory procs
dwResult += RegisterProc("Allocate", _Allocate);
dwResult += RegisterProc("ReAllocate", _ReAllocate);
dwResult += RegisterProc("Free", _Free);
// Config procs
dwResult += RegisterProc("Config_Read", Config_Read);
dwResult += RegisterProc("Config_Write", Config_Write);
dwResult += RegisterProc("Config_Get", Config_Get);
dwResult += RegisterProc("Config_GetInt", Config_Get_Int);
dwResult += RegisterProc("Config_GetBool", Config_Get_Bool);
dwResult += RegisterProc("Config_GetPath", Config_Get_Path);
dwResult += RegisterProc("Config_GetSection", Config_Get_Section);
dwResult += RegisterProc("Config_GetLinear", Config_Get_Linear);
dwResult += RegisterProc("Config_GetPermission", Config_Get_Permission);
// Synchronization procs
dwResult += RegisterProc("InitalizeLockObject", InitializeLockObject);
dwResult += RegisterProc("DeleteLockObject", DeleteLockObject);
dwResult += RegisterProc("AcquireSharedLock", AcquireSharedLock);
dwResult += RegisterProc("ReleaseSharedLock", ReleaseSharedLock);
dwResult += RegisterProc("AcquireExclusiveLock", AcquireExclusiveLock);
dwResult += RegisterProc("ReleaseExclusiveLock", ReleaseExclusiveLock);
// User procs
dwResult += RegisterProc("CreateUser", CreateUser);
dwResult += RegisterProc("RenameUser", RenameUser);
dwResult += RegisterProc("DeleteUser", DeleteUser);
dwResult += RegisterProc("Uid2User", Uid2User);
dwResult += RegisterProc("User2Uid", User2Uid);
dwResult += RegisterProc("GetUsers", GetUsers);
// UserFile procs
dwResult += RegisterProc("UserFile_Open", UserFile_Open);
dwResult += RegisterProc("UserFile_OpenPrimitive", UserFile_OpenPrimitive);
dwResult += RegisterProc("UserFile_Lock", UserFile_Lock);
dwResult += RegisterProc("UserFile_Unlock", UserFile_Lock);
dwResult += RegisterProc("UserFile_Close", UserFile_Close);
dwResult += RegisterProc("FindFirstUser", FindFirstUser);
dwResult += RegisterProc("FindNextUser", FindNextUser);
// Group procs
dwResult += RegisterProc("CreateGroup", CreateGroup);
dwResult += RegisterProc("RenameGroup", RenameGroup);
dwResult += RegisterProc("DeleteGroup", DeleteGroup);
dwResult += RegisterProc("Gid2Group", Gid2Group);
dwResult += RegisterProc("Group2Gid", Group2Gid);
dwResult += RegisterProc("GetGroups", GetGroups);
// GroupFile procs
dwResult += RegisterProc("GroupFile_Open", GroupFile_Open);
dwResult += RegisterProc("GroupFile_OpenPrimitive", GroupFile_OpenPrimitive);
dwResult += RegisterProc("GroupFile_Lock", GroupFile_Lock);
dwResult += RegisterProc("GroupFile_Unlock", GroupFile_Lock);
dwResult += RegisterProc("GroupFile_Close", GroupFile_Close);
// Timer procs
dwResult += RegisterProc("StartIoTimer", StartIoTimer);
dwResult += RegisterProc("StopIoTimer", StopIoTimer);
// String procs
dwResult += RegisterProc("SplitString", SplitString);
dwResult += RegisterProc("ConcatString", ConcatString);
dwResult += RegisterProc("GetStringIndex", GetStringIndex);
dwResult += RegisterProc("GetStringIndexStatic", GetStringIndexStatic);
dwResult += RegisterProc("GetStringRange", GetStringRange);
dwResult += RegisterProc("FreeString", FreeString);
// Vfs procs
dwResult += RegisterProc("Access", Access);
dwResult += RegisterProc("GetFileInfo", GetFileInfo);
dwResult += RegisterProc("UpdateFileInfo", UpdateFileInfo);
dwResult += RegisterProc("CloseFileInfo", CloseFileInfo);
dwResult += RegisterProc("FindFileContext", FindFileContext);
dwResult += RegisterProc("InsertFileContext", InsertFileContext);
dwResult += RegisterProc("DeleteFileContext", DeleteFileContext);
dwResult += RegisterProc("CreateFileContext", CreateFileContext);
dwResult += RegisterProc("FreeFileContext", FreeFileContext);
dwResult += RegisterProc("OpenDirectory", OpenDirectory);
dwResult += RegisterProc("MarkDirectory", MarkDirectory);
dwResult += RegisterProc("CloseDirectory", CloseDirectory);
dwResult += RegisterProc("IoRemoveDirectory", IoRemoveDirectory);
// File procs
dwResult += RegisterProc("ioOpenFile", ioOpenFile);
dwResult += RegisterProc("ioCloseFile", ioCloseFile);
dwResult += RegisterProc("ioReadFile", IoReadFile);
dwResult += RegisterProc("ioWriteFile", IoWriteFile);
dwResult += RegisterProc("ioSeekFile", ioSeekFile);
// Socket procs
dwResult += RegisterProc("ioSend", ioSend);
dwResult += RegisterProc("ioRecv", ioRecv);
dwResult += RegisterProc("ioCloseSocket", ioCloseSocket);
dwResult += RegisterProc("Secure_SendResult", Secure_SendResult);
dwResult += RegisterProc("Secure_ReceiveResult", Secure_ReceiveResult);
// Mountfile handling
dwResult += RegisterProc("MountFile_Open", MountFile_Open);
dwResult += RegisterProc("MountFile_Close", MountFile_Close);
// Virtual path handling
dwResult += RegisterProc("PWD_CWD", PWD_CWD);
dwResult += RegisterProc("PWD_GetTable", PWD_GetTable);
dwResult += RegisterProc("PWD_Copy", PWD_Copy);
dwResult += RegisterProc("PWD_Free", PWD_Free);
dwResult += RegisterProc("PWD_Resolve", PWD_Resolve);
// Buffer formatting
dwResult += RegisterProc("FormatBuffer", Put_Buffer_Format);
dwResult += RegisterProc("InsertBuffer", Insert_Buffer);
dwResult += RegisterProc("AppendBuffer", Put_Buffer);
// Message handling
dwResult += RegisterProc("Message_Load", Message_Load);
dwResult += RegisterProc("Message_PreCompile", Message_PreCompile);
dwResult += RegisterProc("MessageFile_Show", MessageFile_Show);
dwResult += RegisterProc("Message_Compile", Message_Compile);
dwResult += RegisterProc("Message_Object_GetInt", Object_Get_Int);
dwResult += RegisterProc("Message_Object_GetString", Object_Get_String);
// Service managment
dwResult += RegisterProc("Service_Start", Service_Start);
dwResult += RegisterProc("Service_Stop", Service_Stop);
dwResult += RegisterProc("Services_Start", Services_Start);
dwResult += RegisterProc("Services_Stop", Services_Stop);
// Job managment
dwResult += RegisterProc("QueueJob", QueueJob);
dwResult += RegisterProc("QueueClientJobEx", QueueClientJobEx);
dwResult += RegisterProc("QueueIoEx", QueueIoEx);
dwResult += RegisterProc("EndJob", EndJob);
dwResult += RegisterProc("StartJobTimer", StartJobTimer);
dwResult += RegisterProc("StopJobTimer", StopJobTimer);
dwResult += RegisterProc("SetJobFilter", SetJobFilter);
// Misc procs
dwResult += RegisterProc("Putlog", Putlog);
dwResult += RegisterProc("InitDataOffsets", InitDataOffsets);
dwResult += RegisterProc("GetUserData", GetUserData);
dwResult += RegisterProc("BindCompletionPort", BindCompletionPort);
darkone is offline  
Closed Thread

Tags
bit, dll, module, pushing, small

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 02:03 PM.

Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)