How to get information from a . CPL?

Asked

Viewed 360 times

11

I wanted to make a program that would display all the items on the control panel. For this I need to consult some registry keys, but there are programs that still use cpl files to store the information.

I learned that cpl are DLL’s written in C++ but I don’t understand very well C++ to understand the structure. I found a topic in MSDN https://msdn.microsoft.com/en-us/library/windows/desktop/cc144199(v=vs.85). aspx which shows the structure of . cpl but I don’t know how to intermediate between cpl, which is a dll written in C++, with my project in C#.

I would like you to give me an example of a code that analyzes Assembly.cpl for example, and return the item name in the control panel, the description text, and the icon (if possible, extract from Assembly to a temporary folder; or if so, return the address of . ico).

I know it’s too much to ask, but if you help me, you’ll be breaking my balls.

  • See help Enumerate and Host Control Panel Applets using C# (http://www.codeproject.com/Articles/6105/Enumerate-and-Host-Control-Panel-Applets-using-C) @Birth Trap

  • The function CPLApplet is exported in C format, so there is nothing with C++ to worry about. Use LoadLibrary and GetProcAddress to get the function of each DLL. Finally, call it as described on the linked page by yourself.

  • Thank you very much. Guilherme Bernal and Hub, you are geniuses.

1 answer

1

An output is to use the file properties. If you take the file properties as cpl, it will come something like "Control Panel Item" however, if you copy the CPL by changing the extension to DLL, you can pick up.

I took for example the CPL: powercfg.cpl I made a copy renamed to powercfg.cpl.dll

Instead of the previous file description, it now came: "Applet Power Management Configuration Control Panel"

There is a file in the English version of Stackoverflow, which can be accessed by https://stackoverflow.com/a/3780110/2788478 which demonstrates a function (Getfiletypedescription) using Windows shell32.dll DLL.

I hope I’ve helped.

Abs

Browser other questions tagged

You are not signed in. Login or sign up in order to post.