473,406 Members | 2,769 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

How to get info from control panel file(*.cpl)

yxq
Hello
I want to retrive the name & Description from a Control Panel Applet(or
*.cpl file),
how to do?

Thanks
Nov 20 '05 #1
11 3351
"yxq" <ga***@163.net> schrieb
Hello
I want to retrive the name & Description from a Control Panel
Applet(or
*.cpl file),
how to do?

Thanks


Untested:

System.Diagnostics.FileVersionInfo.GetVersionInfo
--
Armin

Nov 20 '05 #2
yxq
Hello
Thank your answer, but it cannot get the right description!
You can view the description of *.cpl using notepad.exe.
"Armin Zingler" <az*******@freenet.de> дÈëÏûÏ¢ÐÂÎÅ
:Ot**************@TK2MSFTNGP10.phx.gbl...
"yxq" <ga***@163.net> schrieb
Hello
I want to retrive the name & Description from a Control Panel
Applet(or
*.cpl file),
how to do?

Thanks


Untested:

System.Diagnostics.FileVersionInfo.GetVersionInfo
--
Armin

Nov 20 '05 #3
* "yxq" <ga***@163.net> scripsit:
Thank your answer, but it cannot get the right description!
You can view the description of *.cpl using notepad.exe.


How can you do that?

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

Improve your quoting style:
<http://learn.to/quote>
<http://www.plig.net/nnq/nquote.html>
Nov 20 '05 #4
"yxq" <ga***@163.net> schrieb
Hello
Thank your answer, but it cannot get the right description!
You can view the description of *.cpl using notepad.exe.


I opened desk.cpl in notepad, but I don't know which description you mean.

When you open the file properties in the explorer, is the description
shown anywhere? Which one are you referring to?
--
Armin

http://learn.to/quote
http://www.plig.net/nnq/nquote.html

Nov 20 '05 #5
* "Armin Zingler" <az*******@freenet.de> scripsit:
Thank your answer, but it cannot get the right description!
You can view the description of *.cpl using notepad.exe.


I opened desk.cpl in notepad, but I don't know which description you mean.

When you open the file properties in the explorer, is the description
shown anywhere? Which one are you referring to?


If you are using Windows XP, open the list of all available control
panels and hover one of them with the mouse (the icon). A description
will be displayed as a tooltip.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #6
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> schrieb
* "Armin Zingler" <az*******@freenet.de> scripsit:
Thank your answer, but it cannot get the right description!
You can view the description of *.cpl using notepad.exe.


I opened desk.cpl in notepad, but I don't know which description
you mean.

When you open the file properties in the explorer, is the
description shown anywhere? Which one are you referring to?


If you are using Windows XP, open the list of all available
control panels and hover one of them with the mouse (the icon). A
description will be displayed as a tooltip.


Ah, ok. You can open the file in the IDE and view the (unmanaged) resources.
There's a string table (value=42) containing the text. I've no clue how
reliable it is to extract this string.
--
Armin

http://learn.to/quote
http://www.plig.net/nnq/nquote.html

Nov 20 '05 #7
* "Armin Zingler" <az*******@freenet.de> scripsit:
I opened desk.cpl in notepad, but I don't know which description
you mean.

When you open the file properties in the explorer, is the
description shown anywhere? Which one are you referring to?


If you are using Windows XP, open the list of all available
control panels and hover one of them with the mouse (the icon). A
description will be displayed as a tooltip.


Ah, ok. You can open the file in the IDE and view the (unmanaged) resources.
There's a string table (value=42) containing the text. I've no clue how
reliable it is to extract this string.


Sometimes the string has ID 2, sometimes 4, sometime 5. I didn't find
any information on how to add this text in the MSDN library (maybe I
missed something).

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #8
yxq
Hi
I have tested it, but it cannot get the Description in *.cpl file!
Please view Description using notepad.exe.
"Armin Zingler" <az*******@freenet.de> дÈëÏûÏ¢ÐÂÎÅ
:Ot**************@TK2MSFTNGP10.phx.gbl...
"yxq" <ga***@163.net> schrieb
Hello
I want to retrive the name & Description from a Control Panel
Applet(or
*.cpl file),
how to do?

Thanks


Untested:

System.Diagnostics.FileVersionInfo.GetVersionInfo
--
Armin

Nov 20 '05 #9
"yxq" <ga***@163.net> schrieb
Hi
I have tested it, but it cannot get the Description in *.cpl
file!
Please view Description using notepad.exe.


Did you read the other posts in this thread?

I don't have a solution. It seems that the description is stored as a win32
resource but I don't have a reliable way to get it. I also didn't find a
documentation to get the description - probably because there is none.
--
Armin

http://learn.to/quote
http://www.plig.net/nnq/nquote.html

Nov 20 '05 #10
* "yxq" <ga***@163.net> scripsit:
I have tested it, but it cannot get the Description in *.cpl file!
Please view Description using notepad.exe.


?!?

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

Improve your quoting style:
<http://learn.to/quote>
<http://www.plig.net/nnq/nquote.html>
Nov 20 '05 #11
Each *.cpl file exports a function called CplApplet that you can call with
the appropriate message constant to retrieve information about the applet
(including the description). The MSDN library has a good article on this.

http://msdn.microsoft.com/library/de...v/conpanel.asp
Unfortunately, if you want to get the information from an arbitrary applet
you can't use a standard PInvoke call since you don't know the name or path
of the applet until runtime. A good method to use in these cases is to use
System.Reflection.Emit to create a dynamic PInvoke call. Check out Matthias
Sjogren's excellent website for an example.

http://www.msjogren.net/dotnet/eng/s...dynpinvoke.asp

"yxq" <ga***@163.net> wrote in message
news:Op**************@TK2MSFTNGP11.phx.gbl...
Hello
I want to retrive the name & Description from a Control Panel Applet(or
*.cpl file),
how to do?

Thanks

Nov 20 '05 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: R6_2003 | last post by:
Hello all, i dunno if that's the right newsgroup to ask, but i'll try, please ignore me if u feel its not 0:) i've been messing with a control panel app for so long.. previously i was using...
3
by: Roel Castro | last post by:
Hello everyone, Could somebody help me how to open time/date item in Control panel by codes in access form modules? Taking in consideration the operating system which is Windows 98, Windows 2000...
1
by: Stuart Roberts | last post by:
I wish to implement a control panel applet for my application, accessed from the standard windows control panel. Is they a simple way of ding this for a C# project? Am I right in thinking that i...
0
by: Girish NS | last post by:
Hi, I 'm trying to start mlcfg32.cpl thru CreateProcess(). The .cpl file is in C:\Program Files\Common Files\System\Mapi\1033 folder instead of C:\WINNT\system32 where the default control panel...
19
by: yxq | last post by:
Hello I want to retrive the Name & Description from a Control Panel file(*.cpl) how to do? Thanks
7
by: Jay | last post by:
Hey There, I've been trying to see if there is a way to programmatically block, or hide, the Control Panel. Since it is a "Virtual Folder", just blocking an .exe from running doesn't work. Even...
3
by: LeftyRight | last post by:
H E L P !!!! My XP operating system has lost the control panel in standard operating mode. It can only be found in SAFE MODE. In my folder options dialog box the “ Show Control Panel in My Computer...
3
by: Grok | last post by:
My C# application is a Windows Service. I have two problems that I would like to solve in the correct way using C#.NET. 1) There are a number of user settings which I'd like to store in an XML...
2
by: Big D | last post by:
Is there a way to embed timedate.cpl into a form?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.