Skip to main content
Topic: need some help with masstagger (Read 4559 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

need some help with masstagger

Hello

This weekend, i've tryed my firsts little upgrades on some plugins.

I've not codded nothing from years, and I know very bad C++, JAVA or other Object languages.

So, there is my question:
I've done some little modifications onto masstager action, I've added an "auto field number" that is the same than autotracknumber, but with an imput box for the field name. That's work, even if it's not very good programmed cause i've used the "remove field" interface, and not redone my own.

Now, I want to add an action that reads information from tags too, but I've seen all these actions have an "static BOOL CALLBACK " function at the begining, and I don't understant the usage of this function. I've seen that it's called in "initialize", but i don't understand at all what happend with this.

What I want is to open exactly the same dialog than in action format, with a tagname and a formating string entry.

Anyone can explain me this function, or give me a place where I can find this information?

need some help with masstagger

Reply #1
You are probably talking about the DialogProc function, i.e. the functions that drives the configuration dialog for a particular masstagger action. You should probably first look at the Dialog Boxes overview on MSDN, or if you really don't know anything about WWin32 GUI programming, a tutorial might be even better. There might be some on MSDN, otherwise you should try Google. I'm afraid I don't have bookmarks for this that I could share here.

need some help with masstagger

Reply #2
Quote
You are probably talking about the DialogProc function, i.e. the functions that drives the configuration dialog for a particular masstagger action. You should probably first look at the Dialog Boxes overview on MSDN, or if you really don't know anything about WWin32 GUI programming, a tutorial might be even better. There might be some on MSDN, otherwise you should try Google. I'm afraid I don't have bookmarks for this that I could share here.
[{POST_SNAPBACK}][/a]

to familiarize your self with various aspects of windows programming, including dialog boxes, I have always like theForgers tutorial, [a href="http://www.winprog.org/tutorial/]http://www.winprog.org/tutorial/[/url]

need some help with masstagger

Reply #3
OK, thank you a lot for these explanations and links.

need some help with masstagger

Reply #4
Hello,

I've done what I wana want, but now I have an other little problem :

The SDK I have contains masstagger v 1.3.2 and the masstagger I use normally is v 1.4.5, so, is it possible to have a SDK with the last version of masstagger? (or just masstagger last version's sources...)

need some help with masstagger

Reply #5
I have an other problem, when I compile the DLL, the filesize is between 400 and 500 KB, is very larger thant the well compiled original masstagger DLL!!

And I've tryen to remove all debugs options I've found into "project" options, so what are the good options please?

need some help with masstagger

Reply #6
Anyway, if someone is intterrested by my little contribution, what I've done is a masstagger command based on autotracknumber but with :
- the ability to choose the field autonumbered
- the possibility to enter a "enumbering pattern" (my english is very bad, and I don't know the real sentence, but) when this patern is the same between the current track and the previous, the field number is incremented, and when is different, the numbering is restarted to 1.

It's not a complex function, but usefull for all users using others numbering fields (like me with my movment number for classical works).

So, if someone is interrested by this I can give the badly compilated DLL or the source cpp modified file

need some help with masstagger

Reply #7
You don't really need to compile the complete foo_masstag component. All you need is the definition of the masstagger_action service from masstagger_action.h (which by the way has not changed between the versions you mentioned) and the implementation of your new action, which should have a new name (so the user can identify it) and a new GUID (so the program can identify it). Of course you shouldn't name the resulting DLL foo_masstag.dll either, since it will amend the original masstagger component instead of replacing it.

As for reducing the DLL size, have you tried compiling a release build?

need some help with masstagger

Reply #8
Thank you for your help, but I can't find the good way to create my own project...

What I've done:
- Created a new folder : SDK/foobar2000/foo_autofield
- puted in this folder my own actions.cpp and and .rc file with only my things.
- added my project to the SDK workspace

My incluides are:
Code: [Select]
#include "../SDK/foobar2000.h"
#include "../helpers/helpers.h"
#include "../foo_masstag/masstagger_action.h"
#include "../foo_masstag/resource.h"
#include <shlobj.h>



And my problem is that I have a linking error:
Code: [Select]
Linking...
actions.obj : error LNK2001: unresolved external symbol "public: unsigned int __thiscall string8::replace_char(unsigned int,unsigned int,unsigned int)" (?replace_char@string8@@QAEIIII@Z)
actions.obj : error LNK2001: unresolved external symbol "int __cdecl uDialogBox(unsigned int,struct HWND__ *,int (__stdcall*)(struct HWND__ *,unsigned int,unsigned int,long),long)" (?uDialogBox@@YAHIPAUHWND__@@P6GH0IIJ@ZJ@Z)
actions.obj : error LNK2001: unresolved external symbol __imp__uMessageBox
...
Debug/foo_autofield.dll : fatal error LNK1120: 23 unresolved externals
Error executing link.exe.


I think I have a problem with include or with some path somewhere, but don't find where  anyone can help me please?

Foosion, I think your right for the release build, but how to build a release?

need some help with masstagger

Reply #9
The linker errors are the result of missing dependencies. See the tutorial thread for instructions on how set those up.

To compile a release build, change your active project configuration to "Release" and recompile. There is a toolbar with a dropdown box for setting the active project configuration in Visual Studio. You might have to enable that toolbar (look for "Build"). Here is a screenshot of that dropdown in Visual C++ 6.0:
.

In Visual Studio 7.1, it looks like this:

need some help with masstagger

Reply #10
OK, thank you again, it was a dependencies problem, I don't know why, but they was nothing in my "dependencies" window, I don't know what I've done, but now all projects are here. So I've puted the same dependencies than in foo_masstag and he work well.

Thank you too for the release ( I'm using VC++ 6) I've added the "Build" toolbar and now I can build a release...

need some help with masstagger

Reply #11
Sorry to annoying you again... but the way to the working final component seem to bee long and hard.

I have puted my component with it's interface in a separate project, and it works well.

But now, when I try to compile a release build, I have some definitions errors in the linking step:
Code: [Select]
Linking...
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _sprintf already defined in LIBCMT.lib(sprintf.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: __i64toa already defined in LIBCMT.lib(xtoa.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: __ui64toa already defined in LIBCMT.lib(xtoa.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: __ultoa already defined in LIBCMT.lib(xtoa.obj)
... ...


I think some foobar library is included two times, but I don't find what and where.

I have dependencies on the three foobar2000_* projects

And my include is:
Code: [Select]
#include "../SDK/foobar2000.h"
#include "../helpers/helpers.h"
#include "../foo_masstag/masstagger_action.h"
#include "resource.h"
#include <shlobj.h>


If anyone know the answer, I'm very interested

need some help with masstagger

Reply #12
Quote
Remember that all projects must link the C runtime dynamically ("Multithreaded DLL" in Project/Settings/C++/Code Generation).

need some help with masstagger

Reply #13
Ok, I found what was wrong...

I was already in multithreaded DLL, but i was compiling onmy my project, and, we must "Rebuild All" and now it works!

Thank you a lot foosion for all these answers

 
SimplePortal 1.0.0 RC1 © 2008-2019