Solved

How to use advapi32.dll in VB.NET

Posted on 2003-10-29
5
782 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
5 Comments
 
LVL 48

Expert Comment

by:AlexFM
ID: 9642425
0
 
LVL 5

Accepted Solution

by:
fantasy1001 earned 500 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

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…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

705 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now