Click here to Skip to main content
15,912,578 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
When I was using VB.NET I was able to import some DLL's. But I don't know, how to do that in C#.

Here's the VB.NET code ;

VB
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Private Declare Function RegisterServiceProcess Lib "Kernel32.dll" (ByVal dwProcessId As Integer, ByVal dwType As Integer) As Integer



How Can I Convert the Above VB.NET code to C# ?
Posted
Comments
Nikil S 6-Dec-11 10:55am    
The Declare Declaration is not supported in C#.

1 solution

You can use extern[^] to define an external reference.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900