Solved

How to use advapi32.dll in VB.NET

Posted on 2003-10-29
5
848 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
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…
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…

726 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