Hi Harvey,
in my applications (VO 2.8 SP4b) it works:
pGCDump := MemAlloc(_SIZEOF(DWORD) + (dwMax*_SIZEOF(_GCENTRY)))
IF pGCDump<>NULL_PTR
pGCDump.nEntryCount:=dwMax
dwItems:=CreateGCDump(pGCDump,6)
pGCEntry:=PTR(_CAST,DWORD(_CAST,pGCDump)+_SIZEOF(DWORD))
IF dwItems > 0 .and. lWriteDump
oLog := FFileSpec{cDumpFilename}
oLog:Create( FC_NORMAL )
oLog:WriteLine("Active references to dynamic memory: "+NTrim(dwItems))
oLog:WriteLine("-------------------------------------------")
oLog:WriteLine(" ")
//ODS32("Active references to dynamic memory: "+NTrim(dwItems))
//ODS32("-------------------------------------------")
FOR X := 1 UPTO dwItems
oLog:WriteLine("Created by : " + Iif(pGCEntry.nGCType==GC_TYPE_STACK,"Compiler","RegisterKid()"))
oLog:WriteLine("Dyn.Addr. : " + NTrim(DWORD(_CAST,pGCEntry.pDynMem)))
oLog:WriteLine("Size : " + NTrim(pGCEntry.nSize))
oLog:WriteLine("Reference : " + NTrim(DWORD(_CAST,pGCEntry.ppRefDynMem)))
oLog:WriteLine("Type : " + GCVarType(pGCEntry.nVarType))
//__Type2String(DWORD(_CAST,pGCEntry.nVarType)))
oLog:WriteLine("Value : " + Psz2String(@pGCEntry.abValue[1]))
oLog:WriteLine(" ")
pGCEntry:=pGCEntry + 1
NEXT
oLog:Close()
ENDIF
MemFree(pGCDump)
ENDIF
This NG may be dead because the current development of the successor
(X#) is here:
https://www.xsharp.eu , and here you will find also the
last VO development team.
Wolfgang
harvey...@gmail.com wrote:
Anyone use the CreateGCDump() dll function? I know the forum is all
but dead. Hoping though... I tried using this function and the
return does not match the structure definition. It returns the number
of entries correctly, but for the GCE structure, it only returns 1
element. If I peek in using the debugger, there are 93 entries as a
subarray to element 1 of pEntry, but always 1 element only in the
main array, and that's not what the code is looking for. I gleaned
the GCDUMP() code from this site. Here's a snipper of where the
problem is.
LOCAL pDump AS _GCDUMP
LOCAL pEntry AS _GCENTRY //structure with 6 members - only seeing 1
nEntries := CreateGCDump(pDump, nType) //doesn't matter which type
i try Log("Total Entries: " + NTrim(nEntries),
GetCurPath()+"GCDump.log") //this works finds between 93 and 153
depending on what I ask for. FOR dwCount := 1 UPTO nEntries
pEntry := @pDump.GCE[dwCount] //craps out when >1 with bound error
any help appreciated.
thanks.
Steve McNaughton
Harvey.The.RV.20.@gmail Drop the periods & add the .com
--
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)