void ModifyObjectName(NWDSContextHandle con)
{
int x;
NWDSCCODE cCode;
if(dontCreate != 1)
{
printf("Modifying Objects Names.\n");
for(x = 0; x < 5; x++)
{
if((New[x] = malloc(50)) == NULL)
{
printf("Memory allocation failed.\n");
ShutDownFlag = 1;
break;
}
else
{
switch(x)
{
case 0: strcpy(New[x], "test");
break;
case 1: strcpy(New[x], "test2");
break;
case 2: strcpy(New[x], "test3");
break;
case 3: strcpy(New[x], "test4");
break;
case 4: strcpy(New[x], "test5");
break;
}
strcat(New[x], ".");
strcat(New[x], strObjectContext);
if((cCode = NWDSModifyRDN(con, Names[x], New[x], 1)) != 0)
{
printf("Change object name failed:%d\n", cCode);
}
else
{
printf("%s changed to %s.\n", Names[x], New[x]);
}
}
}
}
}
|