diff options
-rw-r--r-- | plugins/WhoUsesMyFiles/src/list.cpp | 2 | ||||
-rw-r--r-- | plugins/WhoUsesMyFiles/src/wumf.cpp | 11 | ||||
-rw-r--r-- | plugins/WhoUsesMyFiles/src/wumf.h | 8 | ||||
-rw-r--r-- | plugins/WhoUsesMyFiles/src/wumfplug.cpp | 18 | ||||
-rw-r--r-- | plugins/WhoUsesMyFiles/wumf_11.vcxproj | 8 | ||||
-rw-r--r-- | plugins/WhoUsesMyFiles/wumf_11.vcxproj.filters | 8 |
6 files changed, 26 insertions, 29 deletions
diff --git a/plugins/WhoUsesMyFiles/src/list.cpp b/plugins/WhoUsesMyFiles/src/list.cpp index 1e52e12e4d..1f635837ca 100644 --- a/plugins/WhoUsesMyFiles/src/list.cpp +++ b/plugins/WhoUsesMyFiles/src/list.cpp @@ -16,7 +16,7 @@ PWumf new_wumf( DWORD dwID, if(!w)return NULL;
#define SCPY(X) if(X){w->X = (LPSTR)malloc(1+strlen(X));if(!w->X)return NULL;strcpy(w->X, X);} else { w->X = NULL;}
- #define SCPYW(X) if(X){w->X = (LPSTR)malloc(1+lstrlenW(X));if(!w->X)return NULL;wsprintfA(w->X, "%S", X);} else { w->X = NULL;}
+ #define SCPYW(X) if(X){w->X = (LPSTR)malloc(1+lstrlenW((LPWSTR)X));if(!w->X)return NULL;wsprintfA(w->X, "%S", X);} else { w->X = NULL;}
#define SCCPY(X, Y) w->X = (LPSTR)malloc(1+strlen(Y));if(!w->X)return NULL;strcpy(w->X, Y)
diff --git a/plugins/WhoUsesMyFiles/src/wumf.cpp b/plugins/WhoUsesMyFiles/src/wumf.cpp index cac2a452df..8eeb2308e0 100644 --- a/plugins/WhoUsesMyFiles/src/wumf.cpp +++ b/plugins/WhoUsesMyFiles/src/wumf.cpp @@ -7,11 +7,6 @@ static PWumf list = NULL;
static PWumf lst = NULL;
-extern WUMF_OPTIONS WumfOptions;
-extern HANDLE hInst;
-extern HWND hDlg;
-extern char ModuleName[];
-
HANDLE hLog = INVALID_HANDLE_VALUE;
BOOL wumf();
@@ -297,7 +292,7 @@ void process_file(SESSION_INFO_1 s_info, FILE_INFO_3 f_info) PWumf w = fnd_cell(&list, f_info.fi3_id);
if(!w)
{
- w = new_wumf(f_info.fi3_id, f_info.fi3_username, f_info.fi3_pathname, s_info.sesi1_cname, NULL, 0, f_info.fi3_permissions, GetFileAttributes(f_info.fi3_pathname));
+ w = new_wumf(f_info.fi3_id, (LPSTR)f_info.fi3_username, (LPSTR)f_info.fi3_pathname, (LPSTR)s_info.sesi1_cname, NULL, 0, f_info.fi3_permissions, GetFileAttributes((LPSTR)f_info.fi3_pathname));
w->mark = FALSE;
if(!add_cell(&list, w)){
msg("Error memory allocation");
@@ -313,8 +308,8 @@ void printError(DWORD res) {
LPVOID lpMsgBuf;
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS, NULL, res, 0, (LPTSTR) &lpMsgBuf, 0, NULL );
- OutputDebugString(lpMsgBuf);
- msg(lpMsgBuf);
+ OutputDebugString((LPCTSTR)lpMsgBuf);
+ msg((LPCTSTR)lpMsgBuf);
LocalFree( lpMsgBuf );
}
diff --git a/plugins/WhoUsesMyFiles/src/wumf.h b/plugins/WhoUsesMyFiles/src/wumf.h index 5535ae0c5f..331fa48eef 100644 --- a/plugins/WhoUsesMyFiles/src/wumf.h +++ b/plugins/WhoUsesMyFiles/src/wumf.h @@ -21,6 +21,8 @@ #include "resource.h"
+#define ModuleName "WUMF Plugin"
+
#define LIFETIME_MAX 60
#define LIFETIME_MIN 1
#define MAX_PATHNAME 512
@@ -111,7 +113,11 @@ BOOL del_all (PWumf* l); void mark_all (PWumf* l, BOOL mark);
BOOL del_marked(PWumf* l);
-
+extern WUMF_OPTIONS WumfOptions;
+extern HINSTANCE hInst;
+extern HANDLE hLog;
+static HANDLE hWumfBut;
+extern PWumf list;
void FreeAll();
VOID CALLBACK TimerProc(HWND, UINT, UINT_PTR, DWORD);
diff --git a/plugins/WhoUsesMyFiles/src/wumfplug.cpp b/plugins/WhoUsesMyFiles/src/wumfplug.cpp index 545909511a..b4af03a16b 100644 --- a/plugins/WhoUsesMyFiles/src/wumfplug.cpp +++ b/plugins/WhoUsesMyFiles/src/wumfplug.cpp @@ -2,13 +2,9 @@ HINSTANCE hInst;
WUMF_OPTIONS WumfOptions = { 0 };
-const char ModuleName[] = "WUMF Plugin";
HANDLE hMenuItem = 0;
-extern HANDLE hLog;
-static HWND hDlg;
-static HANDLE hWumfBut;
-extern PWumf list;
int hLangpack;
+HWND hDlg;
static PLUGININFOEX pluginInfo = {
sizeof(PLUGININFOEX),
@@ -21,7 +17,7 @@ static PLUGININFOEX pluginInfo = { "http://miranda-ng.org/",
UNICODE_AWARE,
// {80DCA515-973A-4A7E-8B85-5D8EC88FC5A7}
- { 0x80dca515, 0x973a, 0x4a7e, { 0x8b, 0x85, 0x5d, 0x8e, 0xc8, 0x8f, 0xc5, 0xa7 } }
+ {0x80dca515, 0x973a, 0x4a7e, {0x8b, 0x85, 0x5d, 0x8e, 0xc8, 0x8f, 0xc5, 0xa7}}
};
void LoadOptions()
@@ -228,9 +224,9 @@ void ShowThePreview() -BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved)
+BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
- hInst=hinstDLL;
+ hInst = hinstDLL;
return TRUE;
}
@@ -289,7 +285,7 @@ static INT_PTR WumfMenuCommand(WPARAM wParam,LPARAM lParam) return iResult;
}
-__declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
+extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
{
return &pluginInfo;
}
@@ -574,7 +570,7 @@ int OptionsInit(WPARAM wparam,LPARAM lparam) return 0;
}
-__declspec(dllexport) int Load(void)
+extern "C" __declspec(dllexport) int Load(void)
{
mir_getLP(&pluginInfo);
@@ -619,7 +615,7 @@ __declspec(dllexport) int Load(void) return 0;
}
-__declspec(dllexport) int Unload(void)
+extern "C" __declspec(dllexport) int Unload(void)
{
KillTimer(NULL, 777);
CloseHandle(hLog);
diff --git a/plugins/WhoUsesMyFiles/wumf_11.vcxproj b/plugins/WhoUsesMyFiles/wumf_11.vcxproj index 319f7b3ec1..ff5bfc0617 100644 --- a/plugins/WhoUsesMyFiles/wumf_11.vcxproj +++ b/plugins/WhoUsesMyFiles/wumf_11.vcxproj @@ -182,10 +182,10 @@ <ResourceCompile Include="res\resource.rc" />
</ItemGroup>
<ItemGroup>
- <ClCompile Include="src\list.c" />
- <ClCompile Include="src\resizer.c" />
- <ClCompile Include="src\wumf.c" />
- <ClCompile Include="src\wumfplug.c" />
+ <ClCompile Include="src\list.cpp" />
+ <ClCompile Include="src\resizer.cpp" />
+ <ClCompile Include="src\wumf.cpp" />
+ <ClCompile Include="src\wumfplug.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
diff --git a/plugins/WhoUsesMyFiles/wumf_11.vcxproj.filters b/plugins/WhoUsesMyFiles/wumf_11.vcxproj.filters index 0715f41ff1..85033f9eec 100644 --- a/plugins/WhoUsesMyFiles/wumf_11.vcxproj.filters +++ b/plugins/WhoUsesMyFiles/wumf_11.vcxproj.filters @@ -28,16 +28,16 @@ </ResourceCompile>
</ItemGroup>
<ItemGroup>
- <ClCompile Include="src\list.c">
+ <ClCompile Include="src\list.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="src\resizer.c">
+ <ClCompile Include="src\resizer.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="src\wumf.c">
+ <ClCompile Include="src\wumf.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="src\wumfplug.c">
+ <ClCompile Include="src\wumfplug.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
|