Commit 2b7d8311 authored by Alexandre Julliard's avatar Alexandre Julliard

shell32: Define our own structure for control panel info, with more space for strings.

parent 76e28194
......@@ -23,6 +23,16 @@
#include "cpl.h"
struct applet_info
{
BOOL valid;
LONG_PTR data;
HICON icon;
WCHAR name[256];
WCHAR info[256];
WCHAR helpfile[128];
};
typedef struct CPlApplet {
struct CPlApplet* next; /* linked list */
HWND hWnd;
......@@ -30,8 +40,7 @@ typedef struct CPlApplet {
unsigned count; /* number of subprograms */
HMODULE hModule; /* module of loaded applet */
APPLET_PROC proc; /* entry point address */
NEWCPLINFOW info[1]; /* array of count information.
* dwSize field is 0 if entry is invalid */
struct applet_info info[1]; /* array of count information */
} CPlApplet;
typedef struct CPanel {
......
......@@ -309,8 +309,8 @@ static BOOL SHELL_RegisterCPanelApp(IEnumIDListImpl *list, LPCSTR path)
{
for(i=0; i<applet->count; ++i)
{
WideCharToMultiByte(CP_ACP, 0, applet->info[i].szName, -1, displayName, MAX_PATH, 0, 0);
WideCharToMultiByte(CP_ACP, 0, applet->info[i].szInfo, -1, comment, MAX_PATH, 0, 0);
WideCharToMultiByte(CP_ACP, 0, applet->info[i].name, -1, displayName, MAX_PATH, 0, 0);
WideCharToMultiByte(CP_ACP, 0, applet->info[i].info, -1, comment, MAX_PATH, 0, 0);
applet->proc(0, CPL_INQUIRE, i, (LPARAM)&info);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment