Plugin development with VC8
Moderators: Hacker, petermad, Stefan2, white
Plugin development with VC8
Have anyone already tried VC8 to develop a (FS) plugin (without managed code)?
I am having some problems with function exports?
I have added a def file with the required functions for totalcmd (FSInit,...),
but my output dll doesn't have any exported functions.
I am having some problems with function exports?
I have added a def file with the required functions for totalcmd (FSInit,...),
but my output dll doesn't have any exported functions.
______________________
David Jorge
Personal License #117854
David Jorge
Personal License #117854
djorge
I've just tried to recompile my FS-plugin VirtualDisk in VS8 (the plugin is developed in VS6) - and all worked well, exported functions are visible, the plugin is working.
I've just tried to recompile my FS-plugin VirtualDisk in VS8 (the plugin is developed in VS6) - and all worked well, exported functions are visible, the plugin is working.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
Using TC 11.03 / Win10 x64
Using TC 11.03 / Win10 x64
- ghisler(Author)
- Site Admin
- Posts: 50421
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
I don't have VC8, but if it's similiar to VC6, did you add the .def file to your source list in the project? Otherwise it will be ignored.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- majkinetor !
- Power Member
- Posts: 1580
- Joined: 2006-01-18, 07:56 UTC
- Contact:
I don't know what is going on at my place but I have similar problems with VC 7:
This is the source template I created but it doesn't work despite the fact that functions are exported:
All compiler options are default.
The FileInfo plugin lists this:
Does anybody know what is going on ?
The same code works in Delphi 2005 !.
This is the source template I created but it doesn't work despite the fact that functions are exported:
Code: Select all
#include "stdafx.h"
#define DllExport __declspec( dllexport )
const int _FieldsNum = 1;
BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved )
{
return TRUE;
}
DllExport int __stdcall ContentGetSupportedField(int FieldIndex,char* FieldName,char* Units,int maxlen)
{
if ( (FieldIndex < 0) || (FieldIndex >= _FieldsNum) )
return ft_nomorefields;
strncpy(FieldName, "test field", maxlen);
return ft_string;
}
DllExport int __stdcall ContentGetValue(char* FileName,int FieldIndex,int UnitIndex,void* FieldValue,int maxlen,int flags)
{
if ( (FieldIndex < 0) || (FieldIndex >= _FieldsNum) )
return ft_nosuchfield;
if ( (flags && CONTENT_DELAYIFSLOW) > 0 )
return ft_delayed;
strncpy((char*)FieldValue, "test value", maxlen);
return ft_string;
}
The FileInfo plugin lists this:
Code: Select all
int __stdcall ContentGetSupportedField(int, char *, char *, int)
int __stdcall ContentGetValue(char *, int, int , void *, int, int)
The same code works in Delphi 2005 !.
Habemus majkam!
2ghisler(Author)
Yes. I've added the def file as i usulally do with VC6 and i also have added the compiler option to use this file in the "Module Definition File".
But VC8 keeps complaining:
Yes. I've added the def file as i usulally do with VC6 and i also have added the compiler option to use this file in the "Module Definition File".
But VC8 keeps complaining:
Linking...
TCStartMenu.def : error LNK2001: unresolved external symbol FsFindClose
TCStartMenu.def : error LNK2001: unresolved external symbol FsFindFirst
TCStartMenu.def : error LNK2001: unresolved external symbol FsFindNext
TCStartMenu.def : error LNK2001: unresolved external symbol FsInit
D:\Programming\tc\WFX\TC FS StartMenu\Release\TCStartMenu.lib : fatal error LNK1120: 4 unresolved externals
______________________
David Jorge
Personal License #117854
David Jorge
Personal License #117854
- majkinetor !
- Power Member
- Posts: 1580
- Joined: 2006-01-18, 07:56 UTC
- Contact:
Well, the idea is to build a fs to modify the TC start menu like Ultra TC Main Menu Editor does. Ultra TC Main Menu Editor is a great tool but i think it will be great if i could do the same via an FS plugin. The main problem is that menu entries can't be sorted. But then i could sort the menu with Ultra TC main editor.
But the main purpose is to study the FS TC interface and make my first official plugin because now i have some time available for my own projects. But the code can be easilly modified to the windows start menu although i think it wouldn't be so usefull.
But the main purpose is to study the FS TC interface and make my first official plugin because now i have some time available for my own projects. But the code can be easilly modified to the windows start menu although i think it wouldn't be so usefull.
______________________
David Jorge
Personal License #117854
David Jorge
Personal License #117854
- majkinetor !
- Power Member
- Posts: 1580
- Joined: 2006-01-18, 07:56 UTC
- Contact:
What about dll dependency?I've just tried to recompile my FS-plugin VirtualDisk in VS8 (the plugin is developed in VS6) - and all worked well, exported functions are visible, the plugin is working.
My dll has the folowing dependencies:
MFC80.dll
MSVCR80.dll
MSVCP80.dll
Did your project ported from VC6 become dependent of all VC8 dll?
______________________
David Jorge
Personal License #117854
David Jorge
Personal License #117854
djorge
Of course it becomes (my plugin needs MFC80.DLL and MSCVR80.DLL). It's because the project is compiled with newer CRT and MFC versions, which need newer DLL files.
Of course it becomes (my plugin needs MFC80.DLL and MSCVR80.DLL). It's because the project is compiled with newer CRT and MFC versions, which need newer DLL files.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
Using TC 11.03 / Win10 x64
Using TC 11.03 / Win10 x64