Have problem w/ a simple ActiveX DLL. I am successfully
making calls to RegCreateKeyEx and RegEnumKeyEx, but
as I try to get the values from a given key via RegEnumValues,
the pgm GPFs in OLEAUT32.DLL. This behavior occurs using
VB5 and VB6, w/ the identical code. Here's the def for the
routine that triggers the failure:
I use RegEnumStrValue as an alias for fetching string values.Code:Declare Function RegEnumStrValue Lib "advapi32.dll" _ Alias "RegEnumValueA" (ByVal hKey As Long, _ ByVal dwIndex As Long, _ ByVal lpValueName As String, _ lpcbValueName As Long, lpReserved As Long, _ lpType As Long, lpData As String, lpcbData As Long) As Long
While debugging the routine that uses the API, a GPF occurs
out of the blue. Here's the offending code:
It's absolutely bizarre ! BTW, I written tons and debuggedCode:stName = String$(m_lgValNameLgt + 1, Chr(0)) lgName = Len(stName) stData = String$(m_lgMaxValueLgt + 1, Chr(0)) lgLgt = Len(stData) l = RegEnumStrValue(m_lgCurrKey, i, stName, _ lgName, lgNull, lgType, stData, lgLgt)
of VB code, so that's why I'm so perplexed. I've done a
nbr of searches here and on the Web, but no joy. I have
seen and dealt w/ similar weirdies, esp w/ Access95/97/2000,
but this one has me stumped.
Any suggestions ? TIA....Jet




Reply With Quote