The RegCreateKeyEx() API provides a parameter to specify the
class(object type) of the a key. (lpClass in the definition below)
LONG RegCreateKeyEx(
HKEY hKey,
LPCTSTR lpSubKey,
DWORD Reserved,
LPTSTR lpClass,
DWORD dwOptions,
REGSAM samDesired,
LPSECURITY_ATTRIBUTES lpSecurityAttributes,
PHKEY phkResult,
LPDWORD lpdwDisposition
)
The RegistryKey class in the .NET framework do not provide this
functionality.
How do I do this in .NET? 3 3104
Truth. I've never seen someone use that parameter and don't even know
what it does.
Solution. You could write a interop function that calls the
RegCreateKeyEx Win32 API directory.
Hope this helps,
Randy http://www.kbcafe.com sa***@hotmail.com (Saby) wrote in message news:<84**************************@posting.google. com>... The RegCreateKeyEx() API provides a parameter to specify the class(object type) of the a key. (lpClass in the definition below)
LONG RegCreateKeyEx( HKEY hKey, LPCTSTR lpSubKey, DWORD Reserved, LPTSTR lpClass, DWORD dwOptions, REGSAM samDesired, LPSECURITY_ATTRIBUTES lpSecurityAttributes, PHKEY phkResult, LPDWORD lpdwDisposition )
The RegistryKey class in the .NET framework do not provide this functionality. How do I do this in .NET?
Truth. I've never seen someone use that parameter and don't even know
what it does.
Solution. You could write a interop function that calls the
RegCreateKeyEx Win32 API directory.
Hope this helps,
Randy http://www.kbcafe.com sa***@hotmail.com (Saby) wrote in message news:<84**************************@posting.google. com>... The RegCreateKeyEx() API provides a parameter to specify the class(object type) of the a key. (lpClass in the definition below)
LONG RegCreateKeyEx( HKEY hKey, LPCTSTR lpSubKey, DWORD Reserved, LPTSTR lpClass, DWORD dwOptions, REGSAM samDesired, LPSECURITY_ATTRIBUTES lpSecurityAttributes, PHKEY phkResult, LPDWORD lpdwDisposition )
The RegistryKey class in the .NET framework do not provide this functionality. How do I do this in .NET?
Thanks.
I used the following... Works great.
[DllImport("advapi32.dll")]
public static extern int RegCreateKeyEx(
uint hKey,
string lpSubKey,
int Reserved,
string lpClass,
int dwOptions,
int samDesired,
ref int lpSecurityAttributes,
ref uint phkResult,
ref int lpdwDisposition
);
uint hKey = 0;
int disp = 0;
int reserved = 0;
int ret = 0;
uint root = 0x80000002; //HKLM
ret = SomeClass.RegCreateKeyEx(root, "SOFTWARE\\test1", 0,
"Parameter", 0,0,ref reserved, ref hKey, ref disp); rm****@kbcafe.com (Randy Charles Morin) wrote in message news:<a4*************************@posting.google.c om>... Truth. I've never seen someone use that parameter and don't even know what it does.
Solution. You could write a interop function that calls the RegCreateKeyEx Win32 API directory.
Hope this helps,
Randy http://www.kbcafe.com This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Krzysztof Stachlewski |
last post by:
I tried to run the following piece of code:
Python 2.3.4 (#53, May 25 2004, 21:17:02) on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> o = object()
>>> o.a...
|
by: A |
last post by:
Hi,
I have always been taught to use an inialization list for initialising data
members of a class. I realize that initialsizing primitives and pointers use
an inialization list is exactly the...
|
by: Saby |
last post by:
The RegCreateKeyEx() API provides a parameter to specify the
class(object type) of the a key. (lpClass in the definition below)
LONG RegCreateKeyEx(
HKEY hKey,
LPCTSTR lpSubKey,
DWORD...
|
by: justanotherguy63 |
last post by:
Hi,
I am designing an application where to preserve the hierachy and for
code substitability, I need to pass an array of derived class object in
place of an array of base class object. Since I...
|
by: ypjofficial |
last post by:
Dear All,
According to OOPs , a base class pointer can to point to derived class
object....call this as fact1
But somehow I am not comfortable while understanding this concept.
The explanaition...
|
by: Brad |
last post by:
I am creating a class (not a control) which implements IStateManager. I've
created the class and all of the implementations (LoadView, SaveViewState,
etc...). My Question is: How do I...
|
by: Tony Johansson |
last post by:
Hello!!
You may correct me if I have made any wrong assumptions.
Below I have some simple classes.
When you have this t.ToString() below it's the ToString() method in Object
class that is...
|
by: docschnipp |
last post by:
Hi,
I have a bunch of object derived from the same base class. They all share
the same constructor with some parameters. Now, instead of using a large
switch() statement where I call every...
|
by: archana |
last post by:
Hi all,
I am confuse in concept of inheritance. I am having following 2
classes
class base1
{
public void abc()
{
System.Console.WriteLine("base1 abc");
}
|
by: Rahul |
last post by:
Hi Everyone,
I was just playing around virtual functions and landed up with the
following,
class Base1
{
public: virtual void sample()
{
printf("base::sample\n");
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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,...
|
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...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| | |