Solved

How to use advapi32.dll in VB.NET

Posted on 2003-10-29
5
809 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

785 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