From 99962115431435cf17dfae4d3b7c8d7d55d824bf Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 8 Mar 2019 15:29:44 +0300 Subject: life is too short to remember whether this structure is zeroed or not --- protocols/ConnectionNotify/src/ConnectionNotify.cpp | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'protocols/ConnectionNotify/src') diff --git a/protocols/ConnectionNotify/src/ConnectionNotify.cpp b/protocols/ConnectionNotify/src/ConnectionNotify.cpp index 9a2a3d5122..2ea63878f5 100644 --- a/protocols/ConnectionNotify/src/ConnectionNotify.cpp +++ b/protocols/ConnectionNotify/src/ConnectionNotify.cpp @@ -750,23 +750,12 @@ static LRESULT CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPA return DefWindowProc(hWnd, message, wParam, lParam); } - //show popup void showMsg(wchar_t *pName, DWORD pid, wchar_t *intIp, wchar_t *extIp, int intPort, int extPort, int state) { + struct CONNECTION *mpd = (struct CONNECTION*)mir_alloc(sizeof(struct CONNECTION)); POPUPDATAW ppd; - //hContact = A_VALID_HANDLE_YOU_GOT_FROM_SOMEWHERE; - //hIcon = A_VALID_HANDLE_YOU_GOT_SOMEWHERE; - //char * lpzContactName = (char*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,(WPARAM)lhContact,0); - //99% of the times you'll just copy this line. - //1% of the times you may wish to change the contact's name. I don't know why you should, but you can. - //char * lpzText; - //The text for the second line. You could even make something like: char lpzText[128]; mir_wstrcpy(lpzText, "Hello world!"); It's your choice. - - struct CONNECTION *mpd = (struct CONNECTION*)mir_alloc(sizeof(struct CONNECTION)); - //MessageBox(NULL,"aaa","aaa",1); - memset(&ppd, 0, sizeof(ppd)); //This is always a good thing to do. ppd.lchContact = NULL;//(HANDLE)hContact; //Be sure to use a GOOD handle, since this will not be checked. ppd.lchIcon = LoadIcon(g_plugin.getInst(), MAKEINTRESOURCE(IDI_ICON1)); if (settingResolveIp) { -- cgit v1.2.3