Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to use advapi32.dll in VB.NET

Posted on 2003-10-29
5
Medium Priority
?
990 Views
Last Modified: 2012-06-21
In my VB6 appliction I used function RegSetValueEx from "advapi32.dll" for Open Registry Key and got successfull result.
But when I try to use this function in VB.NET I failed, instead of return value equal to 0  I get strange huge number.

What is wrong? Can I use advapi32 in VB.NET or I need use something else ?
0
Comment
Question by:ulitsky
  • 2
4 Comments
 
LVL 5

Accepted Solution

by:
fantasy1001 earned 2000 total points
ID: 9648138
You can use advapi32 in VB.NET with this

Microsoft.Win32.RegistryKey.SetValue

Thanks,
~Fantasy~
0
 

Author Comment

by:ulitsky
ID: 9648160
Thank you, it's work
0
 
LVL 48

Expert Comment

by:AlexFM
ID: 10163366
I beleive my answer is OK.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

782 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question