diff options
author | Jef <jef@targetspot.com> | 2024-09-24 08:54:57 -0400 |
---|---|---|
committer | Jef <jef@targetspot.com> | 2024-09-24 08:54:57 -0400 |
commit | 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (patch) | |
tree | 12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/Plugins/SDK/plLoadEx | |
parent | 537bcbc86291b32fc04ae4133ce4d7cac8ebe9a7 (diff) | |
download | winamp-20d28e80a5c861a9d5f449ea911ab75b4f37ad0d.tar.gz |
Initial community commit
Diffstat (limited to 'Src/Plugins/SDK/plLoadEx')
-rw-r--r-- | Src/Plugins/SDK/plLoadEx/ExComponent.cpp | 32 | ||||
-rw-r--r-- | Src/Plugins/SDK/plLoadEx/ExComponent.h | 16 | ||||
-rw-r--r-- | Src/Plugins/SDK/plLoadEx/SimpleHandler.cpp | 45 | ||||
-rw-r--r-- | Src/Plugins/SDK/plLoadEx/SimpleHandler.h | 21 | ||||
-rw-r--r-- | Src/Plugins/SDK/plLoadEx/SimpleHandlerFactory.cpp | 56 | ||||
-rw-r--r-- | Src/Plugins/SDK/plLoadEx/SimpleHandlerFactory.h | 20 | ||||
-rw-r--r-- | Src/Plugins/SDK/plLoadEx/SimpleLoader.cpp | 26 | ||||
-rw-r--r-- | Src/Plugins/SDK/plLoadEx/SimpleLoader.h | 14 | ||||
-rw-r--r-- | Src/Plugins/SDK/plLoadEx/example.simple | bin | 0 -> 58 bytes | |||
-rw-r--r-- | Src/Plugins/SDK/plLoadEx/plLoadEx.rc | 74 | ||||
-rw-r--r-- | Src/Plugins/SDK/plLoadEx/plLoadEx.sln | 24 | ||||
-rw-r--r-- | Src/Plugins/SDK/plLoadEx/plLoadEx.vcxproj | 229 | ||||
-rw-r--r-- | Src/Plugins/SDK/plLoadEx/plLoadEx.vcxproj.filters | 56 | ||||
-rw-r--r-- | Src/Plugins/SDK/plLoadEx/resource.h | 17 | ||||
-rw-r--r-- | Src/Plugins/SDK/plLoadEx/version.rc2 | 39 | ||||
-rw-r--r-- | Src/Plugins/SDK/plLoadEx/w5s.cpp | 9 |
16 files changed, 678 insertions, 0 deletions
diff --git a/Src/Plugins/SDK/plLoadEx/ExComponent.cpp b/Src/Plugins/SDK/plLoadEx/ExComponent.cpp new file mode 100644 index 00000000..a9283fe6 --- /dev/null +++ b/Src/Plugins/SDK/plLoadEx/ExComponent.cpp @@ -0,0 +1,32 @@ +#include "ExComponent.h" +#include "api/service/api_service.h" // Service Manager is central to Wasabi +#include "SimpleHandlerFactory.h" // the Service Factory we're going to regsister + +// the service factory we're going to register +static SimpleHandlerFactory simpleHandlerFactory; + +void ExComponent::RegisterServices(api_service *service) +{ + // If we need any services, we can retrieve them here + // however, you have no guarantee that a service you want will be active yet + // so it's best to "lazy load" and get it the first time you need it + + // Register any services we provide here + service->service_register(&simpleHandlerFactory); +} + +void ExComponent::DeregisterServices(api_service *service) +{ + // Unregister our services + service->service_deregister(&simpleHandlerFactory); + + // And release any services we retrieved +} + +// Define the dispatch table +#define CBCLASS ExComponent +START_DISPATCH; +VCB(API_WA5COMPONENT_REGISTERSERVICES, RegisterServices) +VCB(API_WA5COMPONENT_DEREEGISTERSERVICES, DeregisterServices) +END_DISPATCH; +#undef CBCLASS diff --git a/Src/Plugins/SDK/plLoadEx/ExComponent.h b/Src/Plugins/SDK/plLoadEx/ExComponent.h new file mode 100644 index 00000000..fc9e338b --- /dev/null +++ b/Src/Plugins/SDK/plLoadEx/ExComponent.h @@ -0,0 +1,16 @@ +#ifndef NULLSOFT_PLLOADEX_EXCOMPONENT_H +#define NULLSOFT_PLLOADEX_EXCOMPONENT_H + +#include "../Agave/Component/ifc_wa5component.h" + +class ExComponent : public ifc_wa5component +{ +public: + void RegisterServices(api_service *service); + void DeregisterServices(api_service *service); + +protected: + RECVS_DISPATCH; // all Wasabi objects implementing a Dispatchable interface require this +}; + +#endif
\ No newline at end of file diff --git a/Src/Plugins/SDK/plLoadEx/SimpleHandler.cpp b/Src/Plugins/SDK/plLoadEx/SimpleHandler.cpp new file mode 100644 index 00000000..d541f7f4 --- /dev/null +++ b/Src/Plugins/SDK/plLoadEx/SimpleHandler.cpp @@ -0,0 +1,45 @@ +#include "SimpleHandler.h" +#include "SimpleLoader.h" +const wchar_t *Cef_Handler::EnumerateExtensions(size_t n) +{ + if (n == 0) + return L"simple"; + else + return 0; +} + +const wchar_t *Cef_Handler::GetName() +{ + return L"Simple Playlist Loader"; +} + +int Cef_Handler::SupportedFilename(const wchar_t *filename) +{ + size_t filenameLength = wcslen(filename); + size_t extensionLength = wcslen(L".simple"); + if (filenameLength < extensionLength) return SVC_PLAYLISTHANDLER_FAILED; // too short + if (!wcsicmp(filename + filenameLength - extensionLength, L".simple")) + return SVC_PLAYLISTHANDLER_SUCCESS; + else + return SVC_PLAYLISTHANDLER_FAILED; +} + +ifc_playlistloader *Cef_Handler::CreateLoader(const wchar_t *filename) +{ + return new SimpleLoader(); +} + +void Cef_Handler::ReleaseLoader(ifc_playlistloader *loader) +{ + delete (SimpleLoader *)loader; +} + +// Define the dispatch table +#define CBCLASS Cef_Handler +START_DISPATCH; +CB(SVC_PLAYLISTHANDLER_ENUMEXTENSIONS, EnumerateExtensions) +CB(SVC_PLAYLISTHANDLER_SUPPORTFILENAME, SupportedFilename) +CB(SVC_PLAYLISTHANDLER_CREATELOADER, CreateLoader) +VCB(SVC_PLAYLISTHANDLER_RELEASELOADER, ReleaseLoader) +CB(SVC_PLAYLISTHANDLER_GETNAME, GetName) +END_DISPATCH;
\ No newline at end of file diff --git a/Src/Plugins/SDK/plLoadEx/SimpleHandler.h b/Src/Plugins/SDK/plLoadEx/SimpleHandler.h new file mode 100644 index 00000000..c0eeeb2d --- /dev/null +++ b/Src/Plugins/SDK/plLoadEx/SimpleHandler.h @@ -0,0 +1,21 @@ +#ifndef NULLSOFT_PLLOADEX_SIMPLEHANDLER_H +#define NULLSOFT_PLLOADEX_SIMPLEHANDLER_H + +#include "../playlist/svc_playlisthandler.h" + +class Cef_Handler : public svc_playlisthandler +{ +public: + const wchar_t *EnumerateExtensions(size_t n); // returns 0 when it's done + const wchar_t *GetName(); // returns a name suitable for display to user of this playlist form (e.g. PLS Playlist) + int SupportedFilename(const wchar_t *filename); // returns SUCCESS and FAILED, so be careful ... + ifc_playlistloader *CreateLoader(const wchar_t *filename); + void ReleaseLoader(ifc_playlistloader *loader); + // there are a few more functions, but we're not going to implement them because we don't need to do, and the Dispatchable interface + // provides smart default return values + +protected: + RECVS_DISPATCH; // all Wasabi objects implementing a Dispatchable interface require this +}; + +#endif
\ No newline at end of file diff --git a/Src/Plugins/SDK/plLoadEx/SimpleHandlerFactory.cpp b/Src/Plugins/SDK/plLoadEx/SimpleHandlerFactory.cpp new file mode 100644 index 00000000..4f3ab316 --- /dev/null +++ b/Src/Plugins/SDK/plLoadEx/SimpleHandlerFactory.cpp @@ -0,0 +1,56 @@ +#include "SimpleHandlerFactory.h" +#include "SimpleHandler.h" +/* + This is the GUID for our service factory + don't re-use this. + make your own guid with guidgen.exe + lives somewhere like C:\Program Files\Microsoft Visual Studio\2019\Professional\Common7\Tools +*/ + +// {1CCF6445-A452-45e8-BE72-846991CBCAF6} +static const GUID SimpleHandlerGUID = +{ 0x1ccf6445, 0xa452, 0x45e8, { 0xbe, 0x72, 0x84, 0x69, 0x91, 0xcb, 0xca, 0xf6 } }; + + +// our playlist handler. +static Cef_Handler simpleHandler; + +FOURCC SimpleHandlerFactory::GetServiceType() +{ + return svc_playlisthandler::getServiceType(); +} + +const char *SimpleHandlerFactory::GetServiceName() +{ + return "Simple Playlist Loader"; +} + +GUID SimpleHandlerFactory::GetGuid() +{ + return SimpleHandlerGUID; +} + +void *SimpleHandlerFactory::GetInterface(int global_lock) +{ +// simpleHandler is a singleton object, so we can just return a pointer to it + // depending on what kind of service you are making, you might have to + // 'new' an object and return that instead (and then free it in ReleaseInterface) + return &simpleHandler; +} + +int SimpleHandlerFactory::ReleaseInterface(void *ifc) +{ + // no-op because we returned a singleton (see above) + return 1; +} + +// Define the dispatch table +#define CBCLASS SimpleHandlerFactory +START_DISPATCH; +CB(WASERVICEFACTORY_GETSERVICETYPE, GetServiceType) +CB(WASERVICEFACTORY_GETSERVICENAME, GetServiceName) +CB(WASERVICEFACTORY_GETGUID, GetGuid) +CB(WASERVICEFACTORY_GETINTERFACE, GetInterface) +CB(WASERVICEFACTORY_RELEASEINTERFACE, ReleaseInterface) +END_DISPATCH; +#undef CBCLASS
\ No newline at end of file diff --git a/Src/Plugins/SDK/plLoadEx/SimpleHandlerFactory.h b/Src/Plugins/SDK/plLoadEx/SimpleHandlerFactory.h new file mode 100644 index 00000000..c4f6c82b --- /dev/null +++ b/Src/Plugins/SDK/plLoadEx/SimpleHandlerFactory.h @@ -0,0 +1,20 @@ +#ifndef NULLSOFT_PLLOADEX_SIMPLEHANDLERFACTORY_H +#define NULLSOFT_PLLOADEX_SIMPLEHANDLERFACTORY_H + +#include "api/service/waservicefactory.h" + +class SimpleHandlerFactory : public waServiceFactory +{ +public: + FOURCC GetServiceType(); + const char *GetServiceName(); + GUID GetGuid(); + void *GetInterface(int global_lock = TRUE); + int ReleaseInterface(void *ifc); + +protected: + RECVS_DISPATCH; // all Wasabi objects implementing a Dispatchable interface require this + +}; + +#endif
\ No newline at end of file diff --git a/Src/Plugins/SDK/plLoadEx/SimpleLoader.cpp b/Src/Plugins/SDK/plLoadEx/SimpleLoader.cpp new file mode 100644 index 00000000..ef82e18e --- /dev/null +++ b/Src/Plugins/SDK/plLoadEx/SimpleLoader.cpp @@ -0,0 +1,26 @@ +#include "SimpleLoader.h" +#include <stdio.h> +int SimpleLoader::Load(const wchar_t *filename, ifc_playlistloadercallback *playlist) +{ + FILE *simpleFile = _wfopen(filename, L"rt"); + if (simpleFile) + { + wchar_t nextFile[1024]; + while (!feof(simpleFile)) + { + if (fgetws(nextFile, 1024, simpleFile)) + playlist->OnFile(nextFile, 0, -1, 0); + } + return IFC_PLAYLISTLOADER_SUCCESS; + } + + return IFC_PLAYLISTLOADER_FAILED; + +} + +// Define the dispatch table +#define CBCLASS SimpleLoader +START_DISPATCH; +CB(IFC_PLAYLISTLOADER_LOAD, Load) +END_DISPATCH; +#undef CBCLASS
\ No newline at end of file diff --git a/Src/Plugins/SDK/plLoadEx/SimpleLoader.h b/Src/Plugins/SDK/plLoadEx/SimpleLoader.h new file mode 100644 index 00000000..15d4dbf3 --- /dev/null +++ b/Src/Plugins/SDK/plLoadEx/SimpleLoader.h @@ -0,0 +1,14 @@ +#ifndef NULLSOFT_PLLOADEX_SIMPLELOADER_H +#define NULLSOFT_PLLOADEX_SIMPLELOADER_H + +#include "../playlist/ifc_playlistloader.h" + +class SimpleLoader : public ifc_playlistloader +{ +public: + int Load(const wchar_t *filename, ifc_playlistloadercallback *playlist); +protected: + RECVS_DISPATCH; // all Wasabi objects implementing a Dispatchable interface require this +}; + +#endif
\ No newline at end of file diff --git a/Src/Plugins/SDK/plLoadEx/example.simple b/Src/Plugins/SDK/plLoadEx/example.simple Binary files differnew file mode 100644 index 00000000..4c98c54c --- /dev/null +++ b/Src/Plugins/SDK/plLoadEx/example.simple diff --git a/Src/Plugins/SDK/plLoadEx/plLoadEx.rc b/Src/Plugins/SDK/plLoadEx/plLoadEx.rc new file mode 100644 index 00000000..15455697 --- /dev/null +++ b/Src/Plugins/SDK/plLoadEx/plLoadEx.rc @@ -0,0 +1,74 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "#include ""version.rc2""\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + 65535 "{9E398E5F-EDEC-4dd8-A40D-E29B385A88C0}" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#include "version.rc2" + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/Src/Plugins/SDK/plLoadEx/plLoadEx.sln b/Src/Plugins/SDK/plLoadEx/plLoadEx.sln new file mode 100644 index 00000000..e0b1ce92 --- /dev/null +++ b/Src/Plugins/SDK/plLoadEx/plLoadEx.sln @@ -0,0 +1,24 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.32802.440 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "plLoadEx", "plLoadEx.vcxproj", "{28C5A01B-EA4D-48BF-BCBD-D32515FBA99F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {28C5A01B-EA4D-48BF-BCBD-D32515FBA99F}.Debug|x86.ActiveCfg = Debug|Win32 + {28C5A01B-EA4D-48BF-BCBD-D32515FBA99F}.Debug|x86.Build.0 = Debug|Win32 + {28C5A01B-EA4D-48BF-BCBD-D32515FBA99F}.Release|x86.ActiveCfg = Release|Win32 + {28C5A01B-EA4D-48BF-BCBD-D32515FBA99F}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {80A18643-B5B2-4FF2-A66D-8F83807C6D0B} + EndGlobalSection +EndGlobal diff --git a/Src/Plugins/SDK/plLoadEx/plLoadEx.vcxproj b/Src/Plugins/SDK/plLoadEx/plLoadEx.vcxproj new file mode 100644 index 00000000..d9936ed4 --- /dev/null +++ b/Src/Plugins/SDK/plLoadEx/plLoadEx.vcxproj @@ -0,0 +1,229 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{28C5A01B-EA4D-48BF-BCBD-D32515FBA99F}</ProjectGuid> + <Keyword>Win32Proj</Keyword> + <WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <PlatformToolset>v142</PlatformToolset> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <PlatformToolset>v142</PlatformToolset> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <PlatformToolset>v142</PlatformToolset> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <PlatformToolset>v142</PlatformToolset> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>16.0.32629.160</_ProjectFileVersion> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <OutDir>$(PlatformShortName)_$(Configuration)\</OutDir> + <IntDir>$(PlatformShortName)_$(Configuration)\</IntDir> + <LinkIncremental>false</LinkIncremental> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules /> + <CodeAnalysisRuleAssemblies /> + <IncludePath>$(IncludePath)</IncludePath> + <LibraryPath>$(LibraryPath)</LibraryPath> + <TargetExt>.w5s</TargetExt> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <LinkIncremental>false</LinkIncremental> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules /> + <CodeAnalysisRuleAssemblies /> + <IncludePath>$(IncludePath)</IncludePath> + <LibraryPath>$(LibraryPath)</LibraryPath> + <TargetExt>.w5s</TargetExt> + <OutDir>$(PlatformShortName)_$(Configuration)\</OutDir> + <IntDir>$(PlatformShortName)_$(Configuration)\</IntDir> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <OutDir>$(PlatformShortName)_$(Configuration)\</OutDir> + <IntDir>$(PlatformShortName)_$(Configuration)\</IntDir> + <LinkIncremental>false</LinkIncremental> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules /> + <CodeAnalysisRuleAssemblies /> + <IncludePath>$(IncludePath)</IncludePath> + <LibraryPath>$(LibraryPath)</LibraryPath> + <TargetExt>.w5s</TargetExt> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <LinkIncremental>false</LinkIncremental> + <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> + <CodeAnalysisRules /> + <CodeAnalysisRuleAssemblies /> + <IncludePath>$(IncludePath)</IncludePath> + <LibraryPath>$(LibraryPath)</LibraryPath> + <TargetExt>.w5s</TargetExt> + <OutDir>$(PlatformShortName)_$(Configuration)\</OutDir> + <IntDir>$(PlatformShortName)_$(Configuration)\</IntDir> + </PropertyGroup> + <PropertyGroup Label="Vcpkg"> + <VcpkgEnabled>false</VcpkgEnabled> + </PropertyGroup> + <PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <VcpkgConfiguration>Debug</VcpkgConfiguration> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>..\..;..\..\..\Wasabi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;PLLOADEX_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>false</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + <PrecompiledHeader /> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <MultiProcessorCompilation>true</MultiProcessorCompilation> + <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName> + </ClCompile> + <Link> + <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> + <GenerateDebugInformation>true</GenerateDebugInformation> + <ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile> + <SubSystem>Windows</SubSystem> + <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary> + <TargetMachine>MachineX86</TargetMachine> + <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>..\..;..\..\..\Wasabi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;PLLOADEX_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <MultiProcessorCompilation>true</MultiProcessorCompilation> + <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName> + </ClCompile> + <Link> + <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> + <GenerateDebugInformation>true</GenerateDebugInformation> + <ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile> + <SubSystem>Windows</SubSystem> + <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary> + <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <AdditionalIncludeDirectories>..\..;..\..\..\Wasabi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;PLLOADEX_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <PrecompiledHeader /> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>None</DebugInformationFormat> + <MultiProcessorCompilation>true</MultiProcessorCompilation> + <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName> + </ClCompile> + <Link> + <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Windows</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary> + <TargetMachine>MachineX86</TargetMachine> + <ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile> + <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <ClCompile> + <AdditionalIncludeDirectories>..\..;..\..\..\Wasabi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;PLLOADEX_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>None</DebugInformationFormat> + <MultiProcessorCompilation>true</MultiProcessorCompilation> + <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName> + </ClCompile> + <Link> + <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Windows</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary> + <ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile> + <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="ExComponent.cpp" /> + <ClCompile Include="SimpleHandler.cpp" /> + <ClCompile Include="SimpleHandlerFactory.cpp" /> + <ClCompile Include="SimpleLoader.cpp" /> + <ClCompile Include="w5s.cpp" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="ExComponent.h" /> + <ClInclude Include="resource.h" /> + <ClInclude Include="SimpleHandler.h" /> + <ClInclude Include="SimpleHandlerFactory.h" /> + <ClInclude Include="SimpleLoader.h" /> + </ItemGroup> + <ItemGroup> + <ResourceCompile Include="plLoadEx.rc" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/Src/Plugins/SDK/plLoadEx/plLoadEx.vcxproj.filters b/Src/Plugins/SDK/plLoadEx/plLoadEx.vcxproj.filters new file mode 100644 index 00000000..626ce31a --- /dev/null +++ b/Src/Plugins/SDK/plLoadEx/plLoadEx.vcxproj.filters @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Source Files"> + <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> + <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> + </Filter> + <Filter Include="Header Files"> + <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> + <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> + </Filter> + <Filter Include="Resource Files"> + <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> + <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx</Extensions> + </Filter> + </ItemGroup> + <ItemGroup> + <ClCompile Include="ExComponent.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="SimpleHandler.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="SimpleHandlerFactory.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="SimpleLoader.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="w5s.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> + <ClInclude Include="ExComponent.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="SimpleHandler.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="SimpleHandlerFactory.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="SimpleLoader.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="resource.h"> + <Filter>Header Files</Filter> + </ClInclude> + </ItemGroup> + <ItemGroup> + <ResourceCompile Include="plLoadEx.rc"> + <Filter>Resource Files</Filter> + </ResourceCompile> + </ItemGroup> +</Project>
\ No newline at end of file diff --git a/Src/Plugins/SDK/plLoadEx/resource.h b/Src/Plugins/SDK/plLoadEx/resource.h new file mode 100644 index 00000000..d5542519 --- /dev/null +++ b/Src/Plugins/SDK/plLoadEx/resource.h @@ -0,0 +1,17 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by plLoadEx.rc +// +#define IDS_STRING0 1 +#define IDC_BUTTON1 1001 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 103 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1002 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/Src/Plugins/SDK/plLoadEx/version.rc2 b/Src/Plugins/SDK/plLoadEx/version.rc2 new file mode 100644 index 00000000..6e3a4f55 --- /dev/null +++ b/Src/Plugins/SDK/plLoadEx/version.rc2 @@ -0,0 +1,39 @@ + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// +#include "..\..\..\Winamp\buildType.h" +VS_VERSION_INFO VERSIONINFO + FILEVERSION WINAMP_PRODUCTVER + PRODUCTVERSION WINAMP_PRODUCTVER + FILEFLAGSMASK 0x17L +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", "Winamp SA" + VALUE "FileDescription", "Winamp 5.x System Component" + VALUE "FileVersion", STR_WINAMP_PRODUCTVER + VALUE "InternalName", "plLoadEx.w5s" + VALUE "LegalCopyright", "Copyright © 2005-2023 Winamp SA" + VALUE "LegalTrademarks", "Nullsoft and Winamp are trademarks of Winamp SA" + VALUE "OriginalFilename", "plLoadEx.w5s" + VALUE "ProductName", "Winamp Example Service" + VALUE "ProductVersion", STR_WINAMP_PRODUCTVER + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END diff --git a/Src/Plugins/SDK/plLoadEx/w5s.cpp b/Src/Plugins/SDK/plLoadEx/w5s.cpp new file mode 100644 index 00000000..4d94aa5a --- /dev/null +++ b/Src/Plugins/SDK/plLoadEx/w5s.cpp @@ -0,0 +1,9 @@ +#include "ExComponent.h" // the component we're registering is defined here + +ExComponent exComponent; // our component + +// Winamp GetProcAddress()'s this after loading your w5s file +extern "C" __declspec(dllexport) ifc_wa5component *GetWinamp5SystemComponent() +{ + return &exComponent; +} |