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 3103
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: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
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: 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
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
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...
| | |