status = ProBrowserAuthenticate(username, password);
status = ProServersCollect(&aliases);
status = ProArraySizeGet(aliases, &num_servers);
for (i = 0; i < num_servers; i++)
{
status = ProServerUnregister(aliases[i]);
}
ProPath serv;
ProStringToWstring(serv, (char*)workspace.c_str());
ProPath URL;
ProStringToWstring(URL, (char*)serverurlw3.c_str());
ProName wsName;
ProStringToWstring(wsName, (char*)wsNamestr.c_str());
status = ProServerRegister(serv, URL, wsName, &aliased_url);
status = ProServerActivate(serv);
ProPath* p_file_name_array;
ProPath* p_subdir_name_array;
//string da = ".asm,.prt,*.drw";
string da = "*.drw";
ProName namme;
ProStringToWstring(namme, (char*)da.c_str());
status = ProArrayAlloc(0, sizeof(ProPath), 1, (ProArray*)&p_file_name_array);
status = ProArrayAlloc(0, sizeof(ProPath), 1, (ProArray*)&p_subdir_name_array);
status = ProFilesList(aliased_url, namme, PRO_FILE_LIST_LATEST, &p_file_name_array, &p_subdir_name_array);
status = ProArraySizeGet((ProArray*)p_file_name_array,&files);
for (i = 0; i < files; i++)
{
char _path[PRO_PATH_SIZE];
ProWstringToString(_path, p_file_name_array[i]);
wstring substring = //"Your Server URL";
wstring result = p_file_name_array[i];
string sPath(result.begin(), result.end());
partPaths.push_back(sPath);
size_t pos = result.find(substring);
if (pos != wstring::npos) {
result.erase(pos, substring.length());
}
string _name(result.begin(), result.end());
partNames.push_back(_name);
}