summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2012-06-28 20:15:16 +0000
committerKirill Volinsky <mataes2007@gmail.com>2012-06-28 20:15:16 +0000
commitf677c23f055fb75e6a7da00c4109b0515e151d1c (patch)
tree9efaf02eebd47d878fd2e4a498120784373a679d
parent3af989edadb2d955e9d8260b55b2249abcaa84ef (diff)
WhoUsesMyFiles:
compilation fix git-svn-id: http://svn.miranda-ng.org/main/trunk@674 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--plugins/WhoUsesMyFiles/Makefile122
-rw-r--r--plugins/WhoUsesMyFiles/wumf.c6
-rw-r--r--plugins/WhoUsesMyFiles/wumf.h3
-rw-r--r--plugins/WhoUsesMyFiles/wumf.vcxproj106
-rw-r--r--plugins/WhoUsesMyFiles/wumfplug.c45
5 files changed, 51 insertions, 231 deletions
diff --git a/plugins/WhoUsesMyFiles/Makefile b/plugins/WhoUsesMyFiles/Makefile
deleted file mode 100644
index 5cd7a604d9..0000000000
--- a/plugins/WhoUsesMyFiles/Makefile
+++ /dev/null
@@ -1,122 +0,0 @@
-!IF "$(CFG)" == ""
-CFG=Release
-#CFG=Debug
-
-!MESSAGE No configuration specified. Defaulting to $(CFG)
-!ENDIF
-
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-LINK32=link.exe
-
-out=../../bin/Debug/Plugins
-obj=obj
-LIBS = user32.lib netapi32.lib comdlg32.lib shlwapi.lib
-
-
-LINK32_OBJS= \
- "$(obj)\resource.res" \
- "$(obj)\wumfplug.obj" \
- "$(obj)\list.obj" \
- "$(obj)\resizer.obj" \
- "$(obj)\wumf.obj"
-
-
-all : "$(out)\wumfplug.dll" test
-
-$(obj):
- if not exist $(obj) mkdir $(obj)
-
-
-$(out):
- if not exist "$(out)/$(NULL)" mkdir "$(out)"
-
-!IF "$(CFG)" == "Release"
-
-CPP_PROJ=/nologo /MT /W3 /GX /O2 /D "WIN32" /D "_WIN32_WINNT" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /Fp"$(obj)/wumfplug.pch" /YX /Fo"$(obj)/" /Fd"$(obj)/" /FD /c
-MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32
-RSC_PROJ=/l 0x809 /fo"$(obj)\resource.res" /d "NDEBUG"
-BSC32=bscmake.exe
-BSC32_FLAGS=/nologo /o"$(obj)\wumfplug.bsc"
-BSC32_SBRS= \
-
-LINK32_FLAGS= $(LIBS) /nologo /dll /incremental:no /pdb:"$(obj)\wumfplug.pdb" /machine:I386 /out:"$(out)/wumfplug.dll" /implib:"$(obj)/wumfplug.lib"
-
-!ELSEIF "$(CFG)" == "Debug"
-
-CPP_PROJ=/nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_WIN32_WINNT" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /Fp"$(obj)\wumfplug.pch" /YX /Fo"$(obj)\\" /Fd"$(obj)\\" /FD /GZ /c
-MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32
-RSC_PROJ=/l 0x809 /fo"$(obj)/resource.res" /d "_DEBUG"
-BSC32=bscmake.exe
-BSC32_FLAGS=/nologo /o"$(obj)/wumfplug.bsc"
-BSC32_SBRS= \
-
-LINK32_FLAGS=$(LIBS) /nologo /dll /incremental:yes /pdb:"$(obj)\wumfplug.pdb" /debug /machine:I386 /out:"$(out)\wumfplug.dll" /implib:"$(obj)/wumfplug.lib" /pdbtype:sept
-
-!ENDIF
-
-"$(out)\wumfplug.dll" : "$(out)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-
-.c{$(obj)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cpp{$(obj)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cxx{$(obj)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.c{$(obj)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cpp{$(obj)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cxx{$(obj)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-$(obj)/wumfplug.obj: wumfplug.c $(obj) wumf.h
-
-$(obj)/wumf.obj: wumf.c $(obj) wumf.h
-
-$(obj)/resizer.obj: resizer.c $(obj) wumf.h
-
-
-$(obj)/resource.res: resource.rc $(obj)
- $(RSC) $(RSC_PROJ) resource.rc
-
-clean:
- rm -f $(obj)/*.* $(out)/wumfplug.* *.aps
-
-yPER: $(out)/wumfplug.dll
- yPER $(out)/wumfplug.dll /REALIGN_NORMAL
-
-distr: zip
-
-zip: $(out)/wumfplug.dll yPER res/wumf.readme.txt
- pkzip25 -add -max wumf.zip $(out)/wumfplug.dll res/wumf.readme.txt
-
-src:
- rar a -ag wumf-src.rar *.c *.h *.hm *.txt Makefile *.rc res/*.*
-
-re: clean all
-
-test:
- "C:\Documents and Settings\Nike.Neosoft\Application Data\Microsoft\Internet Explorer\Quick Launch\miranda32dbg.exe.lnk"
diff --git a/plugins/WhoUsesMyFiles/wumf.c b/plugins/WhoUsesMyFiles/wumf.c
index 98f741bdd1..524648185e 100644
--- a/plugins/WhoUsesMyFiles/wumf.c
+++ b/plugins/WhoUsesMyFiles/wumf.c
@@ -33,7 +33,7 @@ void AddToList(HWND hList, PWumf w)
lvi.iItem=ListView_GetItemCount(hList)+1;
lvi.mask= LVIF_PARAM|LVIF_TEXT;
lvi.pszText = w->szID;
- lvi.cchTextMax = strlen(w->szID);
+ lvi.cchTextMax = (int)_tcslen(w->szID);
lvi.lParam = (LPARAM)w;
ListView_InsertItem(hList,&lvi);
}
@@ -196,8 +196,8 @@ void LogWumf(PWumf w)
GetDateFormat(LOCALE_USER_DEFAULT,DATE_SHORTDATE, &time,NULL, lpDateStr, 20);
GetTimeFormat(LOCALE_USER_DEFAULT,TIME_FORCE24HOURFORMAT|TIME_NOTIMEMARKER, &time,NULL, lpTimeStr, 20);
wsprintf(str ,"%s %s %20s\t%s\r\n\0",lpDateStr, lpTimeStr, w->szUser, w->szPath);
- SetFilePointer (hLog, 0, NULL, FILE_END) ; ;
- WriteFile(hLog, str ,strlen(str),&bytes,NULL);
+ SetFilePointer (hLog, 0, NULL, FILE_END);
+ WriteFile(hLog, str, (DWORD)_tcslen(str), &bytes, NULL);
}
/*
diff --git a/plugins/WhoUsesMyFiles/wumf.h b/plugins/WhoUsesMyFiles/wumf.h
index 026e8974cf..b256ccb405 100644
--- a/plugins/WhoUsesMyFiles/wumf.h
+++ b/plugins/WhoUsesMyFiles/wumf.h
@@ -15,6 +15,7 @@
#include "m_utils.h"
#include "m_skin.h"
#include "m_popup.h"
+
#include "m_toptoolbar.h"
#include "resource.h"
@@ -124,7 +125,6 @@ void process_file(SESSION_INFO_1 s_info, FILE_INFO_3 f_info);
void printError(DWORD res);
#define msg(X) MessageBox(NULL, X, "WUMF", MB_OK|MB_ICONSTOP)
-#define __EXP __declspec(dllexport)
#define MS_WUMF_SWITCHPOPUP "WUMF/SwitchPopup"
#define MS_WUMF_CONNECTIONSSHOW "WUMF/ShowConnections"
@@ -164,4 +164,3 @@ typedef struct {
} UTILRESIZEDIALOG;
#endif
-
diff --git a/plugins/WhoUsesMyFiles/wumf.vcxproj b/plugins/WhoUsesMyFiles/wumf.vcxproj
index b59b02122d..c6044637fa 100644
--- a/plugins/WhoUsesMyFiles/wumf.vcxproj
+++ b/plugins/WhoUsesMyFiles/wumf.vcxproj
@@ -20,31 +20,25 @@
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{F29CCB9B-79CF-4341-AA05-3626A036D3E3}</ProjectGuid>
- <RootNamespace>wumf</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- <ProjectName>WumfPlug</ProjectName>
+ <ProjectName>WhoUsesMyFiles</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
@@ -69,161 +63,107 @@
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)64\Plugins\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\Obj\$(ProjectName)\</IntDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\</IntDir>
- <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</IgnoreImportLibrary>
- <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</IgnoreImportLibrary>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
- <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</GenerateManifest>
- <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</GenerateManifest>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\Plugins\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)64\Plugins\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\Obj\$(ProjectName)\</IntDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\</IntDir>
- <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</IgnoreImportLibrary>
- <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</IgnoreImportLibrary>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</GenerateManifest>
- <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</GenerateManifest>
+ <IgnoreImportLibrary>true</IgnoreImportLibrary>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>false</MinimalRebuild>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<AdditionalIncludeDirectories>..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
- <ProjectReference>
- <LinkLibraryDependencies>false</LinkLibraryDependencies>
- </ProjectReference>
<Link>
<AdditionalDependencies>user32.lib;netapi32.lib;comdlg32.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
- <AssemblyDebug>true</AssemblyDebug>
<SubSystem>Windows</SubSystem>
- <OptimizeReferences>
- </OptimizeReferences>
- <EntryPointSymbol>DllMain</EntryPointSymbol>
- <TargetMachine>MachineX86</TargetMachine>
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <AdditionalLibraryDirectories>$(SolutionDir)\lib</AdditionalLibraryDirectories>
</Link>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\include\msapi</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>false</MinimalRebuild>
+ <PreprocessorDefinitions>WIN64;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<AdditionalIncludeDirectories>..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
- <ProjectReference>
- <LinkLibraryDependencies>false</LinkLibraryDependencies>
- </ProjectReference>
<Link>
<AdditionalDependencies>user32.lib;netapi32.lib;comdlg32.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
- <AssemblyDebug>true</AssemblyDebug>
<SubSystem>Windows</SubSystem>
- <OptimizeReferences>
- </OptimizeReferences>
- <EntryPointSymbol>DllMain</EntryPointSymbol>
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <AdditionalLibraryDirectories>$(SolutionDir)\lib</AdditionalLibraryDirectories>
</Link>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\include\msapi</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_WIN32;_WINNT;_MBCS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <ExceptionHandling>
- </ExceptionHandling>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BufferSecurityCheck>false</BufferSecurityCheck>
- <DisableLanguageExtensions>false</DisableLanguageExtensions>
- <RuntimeTypeInfo>false</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <CompileAs>CompileAsC</CompileAs>
<AdditionalIncludeDirectories>..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<Optimization>Full</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
</ClCompile>
- <ProjectReference>
- <LinkLibraryDependencies>false</LinkLibraryDependencies>
- </ProjectReference>
<Link>
<AdditionalDependencies>user32.lib;netapi32.lib;comdlg32.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
- <OptimizeReferences>
- </OptimizeReferences>
+ <OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
- <EntryPointSymbol>
- </EntryPointSymbol>
- <TargetMachine>MachineX86</TargetMachine>
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <AdditionalLibraryDirectories>$(SolutionDir)\lib</AdditionalLibraryDirectories>
</Link>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\include\msapi</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_WIN32;_WINNT;_MBCS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <ExceptionHandling>
- </ExceptionHandling>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <PreprocessorDefinitions>WIN64;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BufferSecurityCheck>false</BufferSecurityCheck>
- <DisableLanguageExtensions>false</DisableLanguageExtensions>
- <RuntimeTypeInfo>false</RuntimeTypeInfo>
- <PrecompiledHeader>
- </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <CompileAs>CompileAsC</CompileAs>
<AdditionalIncludeDirectories>..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<Optimization>Full</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
</ClCompile>
- <ProjectReference>
- <LinkLibraryDependencies>false</LinkLibraryDependencies>
- </ProjectReference>
<Link>
<AdditionalDependencies>user32.lib;netapi32.lib;comdlg32.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
- <OptimizeReferences>
- </OptimizeReferences>
+ <OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<EntryPointSymbol>
</EntryPointSymbol>
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <AdditionalLibraryDirectories>$(SolutionDir)\lib</AdditionalLibraryDirectories>
</Link>
<ResourceCompile>
<AdditionalIncludeDirectories>..\..\include\msapi</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemGroup>
diff --git a/plugins/WhoUsesMyFiles/wumfplug.c b/plugins/WhoUsesMyFiles/wumfplug.c
index 3e278e224e..bcb7fd122f 100644
--- a/plugins/WhoUsesMyFiles/wumfplug.c
+++ b/plugins/WhoUsesMyFiles/wumfplug.c
@@ -1,7 +1,6 @@
#include "wumf.h"
HINSTANCE hInst;
-PLUGINLINK *pluginLink;
WUMF_OPTIONS WumfOptions = { 0 };
const char ModuleName[] = "WUMF Plugin";
HANDLE hMenuItem = 0;
@@ -9,9 +8,10 @@ extern HANDLE hLog;
static HWND hDlg;
static int hWumfBut;
extern PWumf list;
+int hLangpack;
-static PLUGININFO pluginInfo = {
- sizeof(PLUGININFO),
+static PLUGININFOEX pluginInfo = {
+ sizeof(PLUGININFOEX),
"WUMF: Who Use My Files?",
PLUGIN_MAKE_VERSION(0,1,0,1),
"Scans for network users of your shared files and notify you with popups. Uses PopUps Interoperability by Luca Santarelli. PopUps plugin must be activated!",
@@ -19,8 +19,10 @@ static PLUGININFO pluginInfo = {
"nike000@users.sf.net",
"© 2003 Nike. Freeware. Please mail me all bugs & your suggestions.",
"http://miranda-im.org",
+ UNICODE_AWARE,
0,
- 0
+ // {80DCA515-973A-4A7E-8B85-5D8EC88FC5A7}
+ { 0x80dca515, 0x973a, 0x4a7e, { 0x8b, 0x85, 0x5d, 0x8e, 0xc8, 0x8f, 0xc5, 0xa7 } }
};
void LoadOptions()
@@ -257,7 +259,7 @@ DWORD WINAPI ThreadProc(LPVOID lpParameter)
}
-static int WumfShowConnections(WPARAM wParam,LPARAM lParam)
+static INT_PTR WumfShowConnections(WPARAM wParam,LPARAM lParam)
{
DWORD threadID = 0;
CloseHandle(CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)ThreadProc, (LPVOID)NULL,0,&threadID));
@@ -266,7 +268,7 @@ static int WumfShowConnections(WPARAM wParam,LPARAM lParam)
return 0;
}
-static int WumfMenuCommand(WPARAM wParam,LPARAM lParam)
+static INT_PTR WumfMenuCommand(WPARAM wParam,LPARAM lParam)
{
BOOL MajorTo0121 = FALSE;
int iResult = 0;
@@ -291,7 +293,7 @@ static int WumfMenuCommand(WPARAM wParam,LPARAM lParam)
return iResult;
}
-__EXP PLUGININFO* MirandaPluginInfo(DWORD mirandaVersion)
+__declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
{
return &pluginInfo;
}
@@ -352,7 +354,7 @@ void ChooseFile(HWND hDlg)
};
-BOOL CALLBACK OptionsDlgProc(HWND hwndDlg,UINT msg,WPARAM wparam,LPARAM lparam)
+INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg,UINT msg,WPARAM wparam,LPARAM lparam)
{
WORD wControlId = LOWORD(wparam);
WORD wNotifyCode = HIWORD(wparam);
@@ -546,20 +548,21 @@ BOOL CALLBACK OptionsDlgProc(HWND hwndDlg,UINT msg,WPARAM wparam,LPARAM lparam)
}
return 0;
}
+
int InitTopToolbar(WPARAM wparam,LPARAM lparam)
{
TTBButton ttb = { 0 };
char buttonname[] = "WUMF: Show connections list";
ttb.cbSize = sizeof(ttb);
- ttb.hbBitmapUp = LoadBitmap(hInst, MAKEINTRESOURCE(IDB_DRIVE));
- ttb.hbBitmapDown = ttb.hbBitmapUp;
- ttb.pszServiceUp = MS_WUMF_CONNECTIONSSHOW;
- ttb.pszServiceDown = MS_WUMF_CONNECTIONSSHOW;;
- ttb.dwFlags = TTBBF_VISIBLE|TTBBF_SHOWTOOLTIP|TTBBF_DRAWBORDER;
+ ttb.hIconUp = LoadIcon(hInst, MAKEINTRESOURCE(IDB_DRIVE));
+ ttb.hIconDn = ttb.hIconUp;
+ ttb.pszService = MS_WUMF_CONNECTIONSSHOW;
+ ttb.dwFlags = TTBBF_VISIBLE|TTBBF_SHOWTOOLTIP;
ttb.name = buttonname;
hWumfBut = CallService(MS_TTB_ADDBUTTON, (WPARAM)&ttb,(LPARAM)0);
return 0;
}
+
int OptionsInit(WPARAM wparam,LPARAM lparam)
{
OPTIONSDIALOGPAGE odp = { 0 };
@@ -573,22 +576,22 @@ int OptionsInit(WPARAM wparam,LPARAM lparam)
odp.pfnDlgProc=OptionsDlgProc;
odp.pszGroup=Translate("Plugins");
odp.flags=ODPF_BOLDGROUPS;
- CallService(MS_OPT_ADDPAGE,wparam,(LPARAM)&odp);
+ Options_AddPage(wparam, &odp);
return 0;
}
-int __EXP Load(PLUGINLINK *link)
+__declspec(dllexport) int Load(void)
{
CLISTMENUITEM mi = { 0 };
- pluginLink=link;
+ mir_getLP(&pluginInfo);
ZeroMemory(&mi, sizeof(mi));
mi.cbSize = sizeof(mi);
LoadOptions();
- CreateServiceFunction(MS_WUMF_SWITCHPOPUP,WumfMenuCommand);
- CreateServiceFunction(MS_WUMF_CONNECTIONSSHOW,WumfShowConnections);
+ CreateServiceFunction(MS_WUMF_SWITCHPOPUP, WumfMenuCommand);
+ CreateServiceFunction(MS_WUMF_CONNECTIONSSHOW, WumfShowConnections);
if (WumfOptions.PopupsEnabled == FALSE)
{
mi.pszName = Translate("Enable WUMF popups");
@@ -602,14 +605,14 @@ int __EXP Load(PLUGINLINK *link)
mi.pszService = MS_WUMF_SWITCHPOPUP;
mi.popupPosition = 1999990000;
mi.pszPopupName = Translate("PopUps");
- hMenuItem = (HANDLE)CallService(MS_CLIST_ADDMAINMENUITEM, (WPARAM)0, (LPARAM)&mi);
+ hMenuItem = (HANDLE)Menu_AddMainMenuItem(&mi);
mi.pszName = Translate("WUMF: Show connections");
mi.hIcon = LoadIcon(hInst,MAKEINTRESOURCE(IDI_DRIVE));
mi.pszService = MS_WUMF_CONNECTIONSSHOW;
mi.popupPosition = 1999990000;
mi.pszPopupName = NULL;
- CallService(MS_CLIST_ADDMAINMENUITEM, (WPARAM)0, (LPARAM)&mi);
+ Menu_AddMainMenuItem(&mi);
HookEvent(ME_OPT_INITIALISE,OptionsInit);
HookEvent(ME_TTB_MODULELOADED, InitTopToolbar);
@@ -620,7 +623,7 @@ int __EXP Load(PLUGINLINK *link)
}
-int __EXP Unload(void)
+__declspec(dllexport) int Unload(void)
{
KillTimer(NULL, 777);
CloseHandle(hLog);