Hi I wondering if someone can help I Canot seem to get the API Call RegCreateKeyEx to work in Windows Vista, keeps giveing me an error I know the code I am using is working, Becuase I used it a number of times on XP

I included a pice of my code below as reference

is there something I need to do in vista to get RegCreateKeyEx working.
any help will be helpfull.

Code:
        'Create the key
        If RegCreateKeyEx(m_Key, KeyPath, 0, "", _
            REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, 0&, KeyCreate, Dispose) <> ERROR_SUCCESS Then
            'Create key faild
            CreateKey = 0
        Else
            'Good result
            CreateKey = 1
        End If
        
        'Close the key
        Call CloseRegKey(KeyCreate)
        'Clear up
        KeyPath = vbNullString