I need to read from a ini file so under good old vb6 .. Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Object, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Integer, ByVal lpFileName As String) As Integer Dim result As Integer = 0 Dim current_category As String = "" Dim category_name As String = "" Dim tmp_cat As String = "" For category_counter = 1 To number_of_categories category_name = "Cat" & CStr(category_counter) result = GetPrivateProfileString("WADS", category_name, "UNKNOWN", tmp_cat, 255, app_path & "wads.cfg") current_category = Left$(tmp_cat, result) Next Accordng to watch window, I'm not getting anything back from tmp_cat, yet result says it received 7 characters, but it should be 14, for Communications. I even changed the category_name value to "Cat1", same result. Daft thing is, GetPrivateProfileInt is working correctly, with almost the same basic params, GetPrivateProfileInt("WADS", "AdminPass", 0, app_path & "wads.cfg"). Any clues, why vb2008 is being a b***h? By the way, incase your wondering, app_path is "c:\vb2008\projects\wads\" so no errors there.