ret = service->NewChannel("load", Trial.ToNewCString(), nsnull, nsnull, &channel);
ret = service->NewChannel("load", Trial.ToNewCString(), nsnull, nsnull, nsnull, &channel);
int nsAccount::GetNCIValues(nsString MiddleValue){	  nsresult ret;  nsIInputStream* in = nsnull;	nsString Trial = "resource:/res/acct/NCI_Dir/";	Trial = Trial + MiddleValue;	printf("this is the trial value %s \n", Trial.ToNewCString());#ifndef NECKO  nsINetService* pNetService = nsnull;  ret = nsServiceManager::GetService(kNetServiceCID,                                      kINetServiceIID,                                     (nsISupports**) &pNetService);  if (NS_FAILED(ret) || (!pNetService)) {    printf("cannot get net service\n");    return 1;  }  nsIURI *url = nsnull;  ret = pNetService->CreateURL(&url, Trial, nsnull, nsnull,    nsnull);  if (NS_FAILED(ret) || (!url)) {    printf("cannot create URL\n");    return 1;  }  ret = pNetService->OpenBlockingStream(url, nsnull, &in);  if (NS_FAILED(ret) || (!in)) {    printf("cannot open stream\n");    return 1;  }#else  NS_WITH_SERVICE(nsIIOService, service, kIOServiceCID, &ret);  if (NS_FAILED(ret)) return ret;  NS_WITH_SERVICE(nsIEventQueueService, eventQService, kEventQueueServiceCID, &ret);  if (NS_FAILED(ret)) return ret;  nsIChannel *channel = nsnull;  // XXX NECKO verb? getter?  ret = service->NewChannel("load", Trial.ToNewCString(), nsnull, nsnull, &channel);  if (NS_FAILED(ret)) return ret;  nsIEventQueue *eventQ = nsnull;  ret = eventQService->GetThreadEventQueue(PR_CurrentThread(), &eventQ);  if (NS_FAILED(ret)) return ret;  ret = channel->OpenInputStream(0, -1, &in);  if (NS_FAILED(ret)) return ret;#endif // NECKO	nsIPersistentProperties* props = nsnull;  ret = nsComponentManager::CreateInstance(kPersistentPropertiesCID, NULL,    kIPersistentPropertiesIID, (void**) &props);  if (NS_FAILED(ret) || (!props)) {    printf("create nsIPersistentProperties failed\n");    return 1;  }  ret = props->Load(in);  if (NS_FAILED(ret)) {    printf("cannot load properties\n");    return 1;  }  int ind = 1; //  while (1) {    char name[256];    name[0] = 0;    nsAutoString v("");    sprintf(name, "%s", "SiteName");    ret = props->GetProperty(name, v);    if (NS_FAILED(ret) || (!v.Length())) {	printf("Failed to return the Get property \n");    }	PL_strcpy(IspLocation[LocCount], v.ToNewCString());	char* lvalue = v.ToNewCString();      cout << "the value is " << IspLocation[LocCount] << "." << endl;      delete[] lvalue;	LocCount++;    sprintf(name, "%s", "Phone");    ret = props->GetProperty(name, v);    if (NS_FAILED(ret) || (!v.Length())) {      	printf("Failed to return the Get property \n");    }	PL_strcpy(IspPhone[PhoneCount], v.ToNewCString());	char* value = v.ToNewCString();//    if (value) {      cout << "the value is " << IspPhone[PhoneCount] << "." << endl;//	  printf ("this is the %d and its value \n ",ind);      delete[] value;  	PhoneCount++;//    }//    else {//      printf("%d: ToNewCString failed\n", ind);//    }//    ind++;//  }return 1;}