Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Developer Tutorials (Read 140615 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: Developer Tutorials

Reply #50
I am having a problem with atl. I've installed the wtl and successfully compiled(and run) foo_sample. But I'm not able to make it work in a solution made from scratch. I added all the files from foo_sample to the solution, next set up the linker and added all the projects from sdk. It compiles fine, but when running in foobar I'm getting 'Internel error - one or more of the installed components have been damaged. How can I make it work?

Re: Developer Tutorials

Reply #51
Have you added the required references under "Frameworks and references"? Right click the project "Solution explorer" and choose "References...". You'll need to add at least pfc, foobar2000_component_client and foobar2000_SDK. Most projects will additionally need foobar2000_sdk_helpers and foobar2000_ATL_helpers.

I'm not entirely sure what the error message means but it sounds like the DLL might lack the proper entrypoint function. This in turn would indicate that foobar2000_component_client is not linked into the DLL.

Re: Developer Tutorials

Reply #52
Perhaps it is a mismatched name to the component filename verification service, versus installing the component to the Application\components folder instead of Configuration\user-components\foo_component_name?

Also, that service is always a good idea if you ever care about receiving crash reports, as it can be bothersome loading minidumps where the DLLs have been renamed from your original build filenames.

Re: Developer Tutorials

Reply #53
Perhaps it is a mismatched name to the component filename verification service, versus installing the component to the Application\components folder instead of Configuration\user-components\foo_component_name?

Also, that service is always a good idea if you ever care about receiving crash reports, as it can be bothersome loading minidumps where the DLLs have been renamed from your original build filenames.
I wouldn't think that that service exists! Thanks for the help.

Re: Developer Tutorials

Reply #54
VALIDATE_COMPONENT_FILENAME is the macro, it declares an implementation of the component validation service, styled to check your filename on disk. It can be expanded through more complex means to perform more thorough verification, although filename is usually all you need to care about for minidump concerns.

Re: Developer Tutorials

Reply #55
Is there something similar for Android version of foobar2000?
a fan of AutoEq + Meier Crossfeed

Re: Developer Tutorials

Reply #56
No. Mobile versions don't support third party components. I'm pretty sure it's not even allowed, certainly not allowed for Apple Store.

Re: Developer Tutorials

Reply #57
There's a lot of things that Apple doesn't allow but fortunately this doesn't affect Android.
On Google Play & Android it's possible to add extra modules as separate APK files if they are published and signed by the same person. So the foobar2000 author will need to upload them in the end, but they can be developed by someone else.
Deadbeef player (Android version) used this mechanism to offer extra decoder pack as a separate APK.
a fan of AutoEq + Meier Crossfeed

 

Re: Developer Tutorials

Reply #58
On Google Play & Android it's possible to add extra modules as separate APK files if they are published and signed by the same person. So the foobar2000 author will need to upload them in the end, but they can be developed by someone else.
So, foobar2000 author will be responsible for those 3rd party plugins made by unknown authors? Sounds like a bad idea.

Re: Developer Tutorials

Reply #59
Hi All, ... sorry for disturbing you but... I am new attempting to getting started in developing a plug-in (4ch Cross-Over with Phase Arbitrator).

Unfortunately it is since 1997 I don't write code in C/C++, but this is not the biggest issue I want to talk about now.
My today post is regarding Visual Studio 2019 set-up and the Foobar tutorial.

I see your Tutorial is quite dated, back to 2010 or so, and there is no reference to the new 2019 SDK or API for the last Foobar 1.5.x: is it still current? Have to start from there?

Would you be so kind to address me on how to correctly install the 2019 SDK along with VS 2019 Community Ed and how to start learning in the best way about the actual Foobar SDK 2019/API 1.5?
I already installed VS 2019 Community Edition adding only the Windows C/C++ Desktop Application Dev Env and I have also downloaded the Foobar SDK but not yet copied anywhere to avoid mistakes.

Many thanks and kind regards, Andrea

Re: Developer Tutorials

Reply #60
@AndreaT, I just endured the pain of migrating from VS2008 with foobar SDK 2010 to VS2019 with the latest foobar SDK. I wouln't bother with the old tutorial, but rely on the sample code that is included in the SDK. The foobar transition involving a single DSP plugin was rather painless. The VS transition was difficult because I don't know much C++ and my C programming style dates back to K&R, which VS didn't like at all.

Regarding the 2019 install, I think all you need in addition to the Desktop C++ support is ATL and MFC for v142 and v141 build tools. At least, that seems to work for me.
Jon Bokelman

Re: Developer Tutorials

Reply #61
@AndreaT, I just endured the pain of migrating from VS2008 with foobar SDK 2010 to VS2019 with the latest foobar SDK. I wouln't bother with the old tutorial, but rely on the sample code that is included in the SDK. The foobar transition involving a single DSP plugin was rather painless. The VS transition was difficult because I don't know much C++ and my C programming style dates back to K&R, which VS didn't like at all.

Regarding the 2019 install, I think all you need in addition to the Desktop C++ support is ATL and MFC for v142 and v141 build tools. At least, that seems to work for me.


Hello @Tam Lin, thanks for your info and tips.
Kind regards, Andrea

Re: Developer Tutorials

Reply #62
Hello @Tam Lin , as per your tips, I installed also MSVC v141 package and, because I got also the stable Win 10 SDK 10.0.1.17763.0.
The ATL C++ package was already installed by default.

However, even so, I am getting strange errors as reported in the screenshots herein attached.
Very strange also the error about the missing Windows SDK ver 10, because I installed 2 Windows SDK, the last stable and the current preview.
Please, would you be so kind to share with me your VS 2019 setup/configuration?
Or can you help me fixing these problems?
Kind regards, Andrea

Re: Developer Tutorials

Reply #63
You can install the XP compatible toolset or change Platform Toolset under project properties to something you actually have installed. Change the Windows SDK to a version you have while you're there.

Re: Developer Tutorials

Reply #64
You can install the XP compatible toolset or change Platform Toolset under project properties to something you actually have installed. Change the Windows SDK to a version you have while you're there.

Hello @Case , thanks for your tips.
Unfortunately, within the VS2019 options, I cannot find any XP target platform. It may it is not so labelled.
Can you see it among the options I listed in the "VS 2019 installed packages.jpg" screenshot I provided?

I also tried to retarget the entire project following the "instruction" given in the error message.
However, doing so, the compiler tells me that I shall have to retarget also the entire Foobar SDK and I don't know if it is good to do.
Also for this matter, if you have any suggestion, please tell me.

Thanks and regards, Andrea

Re: Developer Tutorials

Reply #65
Use this slightly modified copy of the SDK. It's pre-configured for VS2019 and should just work(tm)....

https://github.com/marc2k3/foobar2000-sdk

If you're not familiar with git, just use the green button to download the zip.



Re: Developer Tutorials

Reply #67
Unfortunately, within the VS2019 options, I cannot find any XP target platform. It may it is not so labelled.
Can you see it among the options I listed in the "VS 2019 installed packages.jpg" screenshot I provided?
 
 As I explained, you have to install MFC, ATL, and the v141 (VS2017) tool set. All that is done in the initial VS2019 installation dialog, e.g. when you selected the C++ desktop components. In other words, run Visual Studio Installer again and select modify. The v141 checkbox is near the end of the list of options.
Jon Bokelman

Re: Developer Tutorials

Reply #68
Unfortunately, within the VS2019 options, I cannot find any XP target platform. It may it is not so labelled.
Can you see it among the options I listed in the "VS 2019 installed packages.jpg" screenshot I provided?

 As I explained, you have to install MFC, ATL, and the v141 (VS2017) tool set. All that is done in the initial VS2019 installation dialog, e.g. when you selected the C++ desktop components. In other words, run Visual Studio Installer again and select modify. The v141 checkbox is near the end of the list of options.

Hello @Tam Lin, thanks but as I replied to you in post #62, I already installed all the packages you suggested to install as I had care to show in the screenshot i posted as "VS 2019 - Installed packages.jpg".
So, I have to suppose you did also something else in order to get all running smooth.
Regards, Andrea

Re: Developer Tutorials

Reply #69
AndreaT,
My VS2019 install includes:
Windows 10 SDK (10.0.18362.0)
Just-In-Time debugger
C++ profiling tools
C++ CMake tools for Windows
C++ ATL for latest v142 build tools (x86 & x64)
C++ MFC for latest v142 build tools (x86 & x64)
MSVC v141 - VS 2017 C++ x64/x86 build tools (v14.16)

I am using foobar SDK 2019-06-30
Jon Bokelman

Re: Developer Tutorials

Reply #70
What I didn't realize is the most important difference between AndreaT's VS2019 configuration and mine is I also have VS2017 installed.

When I upgraded from VS2008, and foobar SDK 2010, I first installed VS2017 because the latest foobar SDK is a 2017 solution and should offer the fewest compatibility problems. That was true except I didn't like VS2017. I then tried VS2019. I liked it better than VS2017 and I continued to use it without problems.

A couple days ago I did a system cleanup and deleted unused files and apps, including VS2017. After that I couldn't compile my foobar plugin. Apparently, when VS2019 is installed it 'borrows' the VS2017 tool chain that includes XP support. I had to reinstall both VS2017 and VS2019 to get everything working again.
Jon Bokelman

Re: Developer Tutorials

Reply #71
You can install the v141_xp SDK with Visual Studio 2019's installer.

Re: Developer Tutorials

Reply #72
Yes, I selected v141 when I installed VS2019 but it does not include XP support. Although all VS2017 installs include v141, XP support is a separate selection item for VS2017 installs and that item is not available for VS2019.
Jon Bokelman

Re: Developer Tutorials

Reply #73
It is there for VS2019 but nobody I don't think anyone should be installing it this late in the game.



If you've been maintaining components since XP was a "thing" then it's probably not much effort but for anyone starting out, just install the v142 toolset, update the SDK projects and be done with it.

Random comment/tip: to avoid installing MFC, you can update any .rc files by including windows.h instead of afxres.h

Re: Developer Tutorials

Reply #74
Do it is difficult the source code to run a context menu item programmatically?