I dont want to use the getsettings functions etc. as i am trying to determine the version of office installed using the registry, and im not having much luck with the API calls...i am simply trying to determine the existance of a key. the relevent code is as follows:

Const KEY_QUERY_VALUE = &H1
Const HKEY_LOCAL_MACHINE = &H80000002
Const ERROR_SUCCESS = 0&

Private Declare Function RegOpenKeyEx Lib "AdvApi32" (ByVal Hkey As Long, ByVal lpsubkey As String, ByVal uloptions As Long, ByVal samDesired As Long, ByVal phkresult As Long) As Long

<and later down in the function to determin version:>

Success = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Office\9.0", 0, KEY_QUERY_VALUE, Presult)
If Success = ERROR_SUCCESS Then MsgBox "2000" Else MsgBox "98,97"

---------------------------------------------
The Erorr message i am getitng is :
Cant find DLL Entry Point RegOpenKeyEx in AdvApi32

Have read help contents, but havent been able to solve, all help appreciated.