The Actual problem in all this was the redim preseve in the DLL does not work properly .
1. I define an User define type in Dll
and an array of the user defined type
Public type udt
t1 as s tring
I1 as integer
Private myarr() as udt
2. the function in Dll component does some thing like this
Public function X() as boolean
for i = 1 to 50
Redim Preserve myarr(i)
'****** this statemenmt causes the
'**** general protection fault
myarr(i).t1 = "test" & i
myarr(i).I1 = i
** this function is directly accessed from a standard project which has forms
3. The same procedure works well in the devlopment environment but fails when u actually make the dll and refrence it from the project..
4. The question arises how do you work with redimentioning array's having structures i mean user defined type in it. The whole exercise is actually for populating a tree structure using a binary tree algorithm . Well this works fine when you dimension it at the begining ( ie; if it is a fixed type of array)
ie; dim myarr(1000) as udt
Any help in this reagard is apprciated ..