diff options
-rw-r--r-- | plugins/CountryFlags/flags.vcxproj | 22 | ||||
-rw-r--r-- | plugins/CountryFlags/flags.vcxproj.filters | 14 | ||||
-rw-r--r-- | plugins/CountryFlags/icons.cpp | 4 | ||||
-rw-r--r-- | plugins/CountryFlags/main.cpp | 26 |
4 files changed, 27 insertions, 39 deletions
diff --git a/plugins/CountryFlags/flags.vcxproj b/plugins/CountryFlags/flags.vcxproj index c6e718b91c..9f2bc24012 100644 --- a/plugins/CountryFlags/flags.vcxproj +++ b/plugins/CountryFlags/flags.vcxproj @@ -76,7 +76,7 @@ <Optimization>Disabled</Optimization>
<WarningLevel>Level3</WarningLevel>
<AdditionalIncludeDirectories>..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_DEBUG;UNICODE;WIN32;_WINDOWS;_USRDLL;STRICT;FLAGS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;FLAGS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
@@ -101,7 +101,7 @@ <Optimization>Disabled</Optimization>
<WarningLevel>Level3</WarningLevel>
<AdditionalIncludeDirectories>..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_DEBUG;UNICODE;WIN64;_WINDOWS;_USRDLL;STRICT;FLAGS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN64;_DEBUG;_WINDOWS;_USRDLL;FLAGS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
</ClCompile>
<ResourceCompile>
@@ -126,7 +126,7 @@ <Optimization>Full</Optimization>
<WarningLevel>Level3</WarningLevel>
<AdditionalIncludeDirectories>..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>NDEBUG;UNICODE;WIN32;_WINDOWS;_USRDLL;STRICT;ASSOCMGR_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;FLAGS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
</ClCompile>
<ResourceCompile>
@@ -153,7 +153,7 @@ <Optimization>Full</Optimization>
<WarningLevel>Level3</WarningLevel>
<AdditionalIncludeDirectories>..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>NDEBUG;UNICODE;WIN64;_WINDOWS;_USRDLL;STRICT;ASSOCMGR_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN64;NDEBUG;_WINDOWS;_USRDLL;FLAGS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
</ClCompile>
<ResourceCompile>
@@ -173,13 +173,13 @@ </Link>
</ItemDefinitionGroup>
<ItemGroup>
- <ClCompile Include="countrylistext.c" />
- <ClCompile Include="extraimg.c" />
- <ClCompile Include="huffman.c" />
- <ClCompile Include="icons.c" />
- <ClCompile Include="ip2country.c" />
- <ClCompile Include="main.c" />
- <ClCompile Include="utils.c" />
+ <ClCompile Include="countrylistext.cpp" />
+ <ClCompile Include="extraimg.cpp" />
+ <ClCompile Include="huffman.cpp" />
+ <ClCompile Include="icons.cpp" />
+ <ClCompile Include="ip2country.cpp" />
+ <ClCompile Include="main.cpp" />
+ <ClCompile Include="utils.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="flags.h" />
diff --git a/plugins/CountryFlags/flags.vcxproj.filters b/plugins/CountryFlags/flags.vcxproj.filters index 0b799465fd..1d3dd91efb 100644 --- a/plugins/CountryFlags/flags.vcxproj.filters +++ b/plugins/CountryFlags/flags.vcxproj.filters @@ -19,25 +19,25 @@ </Filter>
</ItemGroup>
<ItemGroup>
- <ClCompile Include="countrylistext.c">
+ <ClCompile Include="countrylistext.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="extraimg.c">
+ <ClCompile Include="extraimg.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="huffman.c">
+ <ClCompile Include="huffman.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="icons.c">
+ <ClCompile Include="icons.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="ip2country.c">
+ <ClCompile Include="ip2country.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="main.c">
+ <ClCompile Include="main.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="utils.c">
+ <ClCompile Include="utils.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
diff --git a/plugins/CountryFlags/icons.cpp b/plugins/CountryFlags/icons.cpp index 82dea7cabc..3b456a4d11 100644 --- a/plugins/CountryFlags/icons.cpp +++ b/plugins/CountryFlags/icons.cpp @@ -105,7 +105,7 @@ static HICON FASTCALL ResizeIconCentered(HICON hIcon,int cx,int cy) if(GetObject(icoi.hbmColor,sizeof(bm),&bm) && bm.bmWidth<=cx && bm.bmHeight<=cy) {
pt.x=(cx-bm.bmWidth)/2;
pt.y=(cy-bm.bmHeight)/2;
- hbmPrev=SelectObject(hdc,icoi.hbmColor);
+ hbmPrev = (HBITMAP)SelectObject(hdc, icoi.hbmColor);
if(hbmPrev!=NULL) { /* error on select? */
hbm=icoi.hbmColor;
icoi.hbmColor=CreateCompatibleBitmap(hdc,cx,cy);
@@ -202,7 +202,7 @@ static INT_PTR ServiceCreateMergedFlagIcon(WPARAM wParam,LPARAM lParam) if(hrgn!=NULL) {
SelectClipRgn(hdc,hrgn);
DeleteObject(hrgn);
- hbmPrev=SelectObject(hdc,icoi.hbmColor);
+ hbmPrev = (HBITMAP)SelectObject(hdc, icoi.hbmColor);
if(hbmPrev!=NULL) { /* error on select? */
if(DrawIconEx(hdc,0,0,hUpperIcon,bm.bmWidth,bm.bmHeight,0,NULL,DI_NOMIRROR|DI_IMAGE))
if(SelectObject(hdc,icoi.hbmMask)!=NULL) /* error on select? */
diff --git a/plugins/CountryFlags/main.cpp b/plugins/CountryFlags/main.cpp index cb2f36b2e8..af6229b09c 100644 --- a/plugins/CountryFlags/main.cpp +++ b/plugins/CountryFlags/main.cpp @@ -43,13 +43,9 @@ static PLUGININFOEX pluginInfo={ };
static const MUUID interfaces[]={MIID_FLAGS,MIID_LAST};
-BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,void *pReserved)
+BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
- UNREFERENCED_PARAMETER(pReserved);
- if(fdwReason==DLL_PROCESS_ATTACH)
- /* Do not call this function from a DLL that is linked to the static C run-time library (CRT).
- * The static CRT requires DLL_THREAD_ATTACH and DLL_THREAD_DETATCH notifications to function properly. */
- DisableThreadLibraryCalls(hInst=hinstDLL);
+ hInst = hinstDLL;
return TRUE;
}
@@ -82,21 +78,17 @@ static void InstallFile(const TCHAR *pszFileName,const TCHAR *pszDestSubDir) }
}
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-__declspec(dllexport) const PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
+extern "C" __declspec(dllexport) const PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
{
return &pluginInfo;
}
-__declspec(dllexport) const MUUID* MirandaPluginInterfaces(void)
+extern "C" __declspec(dllexport) const MUUID* MirandaPluginInterfaces(void)
{
return interfaces;
}
-__declspec(dllexport) int Load(PLUGINLINK *link)
+extern "C" __declspec(dllexport) int Load(PLUGINLINK *link)
{
pluginLink=link;
mir_getLP(&pluginInfo);
@@ -128,7 +120,7 @@ __declspec(dllexport) int Load(PLUGINLINK *link) return 0;
}
-__declspec(dllexport) int Unload(void)
+extern "C" __declspec(dllexport) int Unload(void)
{
KillBufferedFunctions();
UninitExtraImg();
@@ -136,8 +128,4 @@ __declspec(dllexport) int Unload(void) UninitIcons();
UninitCountryListExt();
return 0;
-}
-
-#ifdef __cplusplus
-}
-#endif
+}
\ No newline at end of file |