0
votes

Why do I get a "user-defined type not defined" error when attempting to compile the following API declaration?

Public Declare Function RegQueryInfoKey Lib "advapi32.dll" Alias _
  "RegQueryInfoKeyA" (ByVal hKey As Long, ByVal lpClass As String, _
  ByRef lpcbClass As Long, ByRef lpReserved As Long, ByRef lpcSubKeys As Long, _
  ByRef lpcbMaxSubKeyLen As Long, ByRef lpcbMaxClassLen As Long, _
  ByRef lpcValues As Long, ByRef lpcbMaxValueNameLen As Long, _
  ByRef lpcbMaxValueLen As Long, ByRef lpcbSecurityDescriptor As Long, _
  ByRef lpftLastWriteTime As FILETIME) As Long
1

1 Answers

2
votes

It looks like you haven't declared the FILETIME UDT.

In VB6, it's declared as:

Type FILETIME
  dwLowDateTime As Long
  dwHighDateTime As Long
End Type