Windows API calls are supported in VB.NET but the keyword Any is no longer supported. You can replace Any with String since you are reading and writing to the INI file.
hey
it seems visual basic 2008 do not support this anymore:
do anybody know the code from this in visual basic 2008?Code:Private Declare Function WritePrivateProfileString Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal lpApplicationname As String, ByVal lpKeyname As Any, ByVal lpString As String, ByVal lpfilename As String) As Long Private Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationname As String, ByVal lpKeyname As Any, ByVal lpdefault As String, ByVal lpreturnedstring As String, ByVal nsize As Long, ByVal lpfilename As String) As Long
thanks!
Windows API calls are supported in VB.NET but the keyword Any is no longer supported. You can replace Any with String since you are reading and writing to the INI file.
Good point, but you know what would really help him understand, why don't you go ahead and explain to him the differences between each, and also the reason for the change.
Also, explain to him why string will work in this situation, and not one of the other options that could be available, he needs to learn, and I think you can show him how to.
Giving the answer is never enough
Last edited by NextGen1; 01-23-2011 at 04:15 PM.
The keyword Any was used in VB6 the same way Object type is used in VB.NET. It implicitly converts the entered type to required type by the API call. The reason this keyword is not supported is because of the many enhancements of type conversion in .NET and safer execution. VB.NET wants you to take care of it. Object type can mostly be used in place of Any. This will take care of most of the API's. But the best method is always to use the desired data type.
@ hassan, of course I do, Just wanted the new guy to get use to it, these things help the ppl who ask questions, consider it his "on site training"
Hassan (01-23-2011)
Finally someone that isn't just going to post a couple of webbrowsers
Welcome Born.
Thank you Blubb1337. I laughed at your avatar (:
New blood. It's been a long time coming.
You can win the rat race,Originally Posted by Jeremy S. Anderson
But you're still nothing but a fucking RAT.
++Latest Projects++
[Open Source] Injection Library
Simple PE Cipher
FilthyHooker - Simple Hooking Class
CLR Injector - Inject .NET dlls with ease
Simple Injection - An in-depth look
MPGH's .NET SDK
eJect - Simple Injector
Basic PE Explorer (BETA)