All;
I am sorry for not uploading any code, thought it might a standard problem with a standard solution !!
The code is quite large and this in turn calls another dll. I built a separate C exe to call my code. When I ran this via the de-bugger, I noticed that the code crashed in the line
Code:
fnpUnLoad = (fn_NP_Router_OSPF_UnLoadingDLL)GetProcAddress(hOSPFDLL,"fn_NP_Router_OSPF_UnLoadingDLL");
fnpUnLoad();
fn_NP_MPLS_UnLoadingDll();
free(NETWORK); ----> CRASHES HERE
//NETWORK = NULL;
free(pszProcessingTime);
//FreeLibrary(hRouterDLL); //free the primitive dll(RIP or OSPF)
The NETWORK Sturcture is as follows
Code:
typedef struct stru_NC_Network
{
int n_NC_NumberOfNodes;
int n_NC_NumberOfSwitches;
int n_NC_NumberOfHubs;
int n_NC_NumberOfRouters;
int n_NC_NumberOfAccessPoints;
int n_NC_NumberOfPhysicalMediums; //Included by Sangeetha for tha device which has only physical layer
DEVICE *pstruNodelist[MAXNODES];//list of nodes
DEVICE *pstruSwitchList[MAXSWITCHES];//list of switches
DEVICE *pstruHubList[20];//list of hubs
DEVICE *pstruRouterList[MAXROUTERS];//list of routers
DEVICE *pstruAccessPointList[MAXACCESSPOINTS];//list of access points
DEVICE *pstruPhysicalMediumsList; //list of physical mediums
int n_NC_SourceNode; // used to form the lookup table for ATM/TCP included by sangeetha
int n_NC_DestinationNode; // used to form the lookup table for ATM/TCP included by sangeetha
char *sz_NC_Path[100][100]; // used to form the lookup table for ATM/TCP included by sangeetha
double d_NC_SimulationEndTime; // time at which simulation ends
char *sz_NC_TraceDetails; // used to store the fields which are going to write in a file
char *sz_NC_TraceName; // Name of the trace file
int n_NC_TraceFlag;
int sz_NC_WriteField[13];// used to set the variable which the user wants to set
int sz_NC_ASDeviceCount[MAXAUTONOMOUS]; // added on 6/1/2011 by swetha
int sz_NC_ASRouterCount[MAXAUTONOMOUS]; // added on 7/1/2011 by swetha
};
Hope this helps.
Thanks