mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
- Removed example plugins (will be available tomorrow from http://rainmeter.net/cms/Developers)
- Changed new plugin API exports to __stdcall calling convention - Disabled /DEBUG for Release configurations
This commit is contained in:
@ -29,7 +29,7 @@ extern CRainmeter* Rainmeter;
|
||||
|
||||
static std::wstring g_Buffer;
|
||||
|
||||
LPCWSTR RmReadString(void* rm, LPCWSTR option, LPCWSTR defValue, BOOL replaceMeasures)
|
||||
LPCWSTR __stdcall RmReadString(void* rm, LPCWSTR option, LPCWSTR defValue, BOOL replaceMeasures)
|
||||
{
|
||||
NULLCHECK(option);
|
||||
NULLCHECK(defValue);
|
||||
@ -39,7 +39,7 @@ LPCWSTR RmReadString(void* rm, LPCWSTR option, LPCWSTR defValue, BOOL replaceMea
|
||||
return parser.ReadString(measure->GetName(), option, defValue, (bool)replaceMeasures).c_str();
|
||||
}
|
||||
|
||||
double RmReadFormula(void* rm, LPCWSTR option, double defValue)
|
||||
double __stdcall RmReadFormula(void* rm, LPCWSTR option, double defValue)
|
||||
{
|
||||
NULLCHECK(option);
|
||||
|
||||
@ -48,7 +48,7 @@ double RmReadFormula(void* rm, LPCWSTR option, double defValue)
|
||||
return parser.ReadFormula(measure->GetName(), option, defValue);
|
||||
}
|
||||
|
||||
LPCWSTR RmPathToAbsolute(void* rm, LPCWSTR relativePath)
|
||||
LPCWSTR __stdcall RmPathToAbsolute(void* rm, LPCWSTR relativePath)
|
||||
{
|
||||
NULLCHECK(relativePath);
|
||||
|
||||
@ -58,7 +58,7 @@ LPCWSTR RmPathToAbsolute(void* rm, LPCWSTR relativePath)
|
||||
return g_Buffer.c_str();
|
||||
}
|
||||
|
||||
void* RmGet(void* rm, int type)
|
||||
void* __stdcall RmGet(void* rm, int type)
|
||||
{
|
||||
CMeasurePlugin* measure = (CMeasurePlugin*)rm;
|
||||
|
||||
@ -85,7 +85,7 @@ void* RmGet(void* rm, int type)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void RmExecute(void* skin, LPCWSTR command)
|
||||
void __stdcall RmExecute(void* skin, LPCWSTR command)
|
||||
{
|
||||
CMeterWindow* mw = (CMeterWindow*)skin;
|
||||
|
||||
|
@ -25,31 +25,26 @@
|
||||
#define LIBRARY_DECLSPEC __declspec(dllimport)
|
||||
#endif // LIBRARY_EXPORTS
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define LIBRARY_EXPORT extern "C" LIBRARY_DECLSPEC
|
||||
#define PLUGIN_EXPORT extern "C" __declspec(dllexport)
|
||||
#else
|
||||
#define LIBRARY_EXPORT LIBRARY_DECLSPEC
|
||||
#define PLUGIN_EXPORT __declspec(dllexport)
|
||||
#endif // __cplusplus
|
||||
#define LIBRARY_EXPORT EXTERN_C LIBRARY_DECLSPEC
|
||||
#define PLUGIN_EXPORT EXTERN_C __declspec(dllexport)
|
||||
|
||||
//
|
||||
// Exported functions
|
||||
//
|
||||
|
||||
EXTERN_C
|
||||
#ifdef __cplusplus
|
||||
LIBRARY_EXPORT LPCWSTR RmReadString(void* rm, LPCWSTR option, LPCWSTR defValue, BOOL replaceMeasures = TRUE);
|
||||
LIBRARY_EXPORT LPCWSTR __stdcall RmReadString(void* rm, LPCWSTR option, LPCWSTR defValue, BOOL replaceMeasures = TRUE);
|
||||
#else
|
||||
LIBRARY_EXPORT LPCWSTR RmReadString(void* rm, LPCWSTR option, LPCWSTR defValue, BOOL replaceMeasures);
|
||||
LIBRARY_EXPORT LPCWSTR __stdcall RmReadString(void* rm, LPCWSTR option, LPCWSTR defValue, BOOL replaceMeasures);
|
||||
#endif // __cplusplus
|
||||
|
||||
LIBRARY_EXPORT double RmReadFormula(void* rm, LPCWSTR option, double defValue);
|
||||
LIBRARY_EXPORT double __stdcall RmReadFormula(void* rm, LPCWSTR option, double defValue);
|
||||
|
||||
LIBRARY_EXPORT LPCWSTR RmPathToAbsolute(void* rm, LPCWSTR relativePath);
|
||||
LIBRARY_EXPORT LPCWSTR __stdcall RmPathToAbsolute(void* rm, LPCWSTR relativePath);
|
||||
|
||||
LIBRARY_EXPORT void RmExecute(void* skin, LPCWSTR command);
|
||||
LIBRARY_EXPORT void __stdcall RmExecute(void* skin, LPCWSTR command);
|
||||
|
||||
LIBRARY_EXPORT void* RmGet(void* rm, int type);
|
||||
LIBRARY_EXPORT void* __stdcall RmGet(void* rm, int type);
|
||||
|
||||
enum RmGetType
|
||||
{
|
||||
|
7
Library/Exports.def
Normal file
7
Library/Exports.def
Normal file
@ -0,0 +1,7 @@
|
||||
LIBRARY
|
||||
EXPORTS
|
||||
RmReadString
|
||||
RmReadFormula
|
||||
RmPathToAbsolute
|
||||
RmExecute
|
||||
RmGet
|
@ -124,6 +124,7 @@
|
||||
<ImportLibrary>.\x32/Debug/Rainmeter.lib</ImportLibrary>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<DelayLoadDLLs>Winmm.dll;Version.dll</DelayLoadDLLs>
|
||||
<ModuleDefinitionFile>Exports.def</ModuleDefinitionFile>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
@ -168,6 +169,7 @@
|
||||
<ImportLibrary>.\x64/Debug/Rainmeter.lib</ImportLibrary>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
<DelayLoadDLLs>Winmm.dll;Version.dll</DelayLoadDLLs>
|
||||
<ModuleDefinitionFile>Exports.def</ModuleDefinitionFile>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
@ -210,7 +212,6 @@
|
||||
<OutputFile>../TestBench/x32/Release/Rainmeter.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>lua/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>.\x32/Release/Rainmeter.pdb</ProgramDatabaseFile>
|
||||
<ImportLibrary>.\x32/Release/Rainmeter.lib</ImportLibrary>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
@ -218,6 +219,7 @@
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<DelayLoadDLLs>Winmm.dll;Version.dll</DelayLoadDLLs>
|
||||
<ModuleDefinitionFile>Exports.def</ModuleDefinitionFile>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
@ -264,6 +266,7 @@
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<DelayLoadDLLs>Winmm.dll;Version.dll</DelayLoadDLLs>
|
||||
<ModuleDefinitionFile>Exports.def</ModuleDefinitionFile>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
@ -913,6 +916,9 @@
|
||||
<ClInclude Include="lua\lua\lvm.h" />
|
||||
<ClInclude Include="lua\lua\lzio.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Exports.def" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
|
@ -587,4 +587,9 @@
|
||||
<Filter>Resource Files</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Exports.def">
|
||||
<Filter>Source Files</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
</Project>
|
Reference in New Issue
Block a user