If you ask Windows to follow the link, it points to the document without opening it.
The software continues to run without waiting for the user to respond.
Temporarily stopping the execution is not a good solution.
"Words get in the way"...
I'm not sure that I understand your question. The URN is a link that will take you to the document, but is not intended to open it. Once the document is located, then a user can do whatever it is that they want (and have rights) to do.
Using the SDK, if you have a valid URN string, you can use aaApi_ParseDocumentMonikerString() to parse out the datasource information as well as the document GUID. Once you know that information, you can try to connect to that datasource, and select the document using the GUID to get further document properties, and then do whatever you have rights to do, such as "open" the document.
Ok, I was not very clear.
All of my software is based on ProjectId and DocumentID, and I have users who want to use the URN.
So I'm looking for how to set up a function that would do: URN = GetDocumentURN (ProjectId, DocumentID) [in the active DataSource]
And another which would do the opposite by giving ProjectId and DocumentId from the URN. [by checking that we are in the right DataSource, but that's easy]