ProToolkit ProServerRegister PRO_TK_INVALID_DIR -15
Hello,
I am about to connect to the Windchill server by using ProToolkit written in C.
I would like to register new connection to the Windchill server, then create a workspace and commit .asm abd .prt files in to the workspace.
So far, I have this piece of code:
ProName server_alias;
ProStringToWstring(server_alias, "Toolkit_TEST_SERVER");
char* server_url = "http://host_name/Windchill";
status = ProServerUnregister(server_alias);
status = ProBrowserAuthenticate(uname, pwrd);
ProPath server_url_w;
wchar_t* aliased_url;
wchar_t* workspace_name = L"test-002_15_11_2021";
status = ProStringToWstring(server_url_w, "http://host_name/Windchill");
This is giving me an error:
status = ProServerRegister(server_alias, server_url_w, workspace_name, &aliased_url);
status = PRO_TK_INVALID_DIR(-15)
For me it is also odd to provide a name of the workspace, that I am about to create later on?
ProServerWorkspaceData workspaces;
wchar_t* context_name = L"DA.test-002";
status = ProServerworkspacedataAlloc(context_name, workspace_name, &workspaces);
status = ProServerWorkspaceCreate(NULL, workspaces);
status = ProServerActivate(server_alias);
Can you help me to resolve this issue? Is this right order to create a workspace and push the files to it? Please, advise me the best approach.
