TungVan
asked on
Function declaration
Hello,
First, I will describe the problem:
1) I have 2 DLLs in 2 folders (file, and npdir)
2) file folder generate file.dll and npdir generate npdir.dll
3) in file folder: filesave.c have the following function
BOOL DelFilesNDir(HWND hwnd, char * szPath, BOOL bMoveFlag);
4) in npdir folder: npdir.c have the same function
BOOL DelFilesNDir(HWND hwnd, char * szPath, BOOL bMoveFlag)
They are the same function but placed in 2 different folder. I find it a bit redundant
Can I declare this function in file only? and then use some sort of mechanism in npdir folder to access this function in file?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks, i guess this is the best solution, right?
Maybe someone else has a brighter idea ... just keep this thread open for a while :)
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
That's easy, just add the .c file in both projects.
An even better way is to make a (static) library for that function (and any other similar shared functions), and include the library in both projects.