But if there is no Document, alias is not assigned and I get an exception. Is it possible to cast alias to a string or is there a function to return if it's a un-assigned value?
But yes, from what I understand handle is a void abstraction, so it seems the cast will not work in my case. Do you have a suggestion on how to check if returndata has been assigned with something?
Make sure you assign an initial value (nullptr) before calling the function. Then if it is still nullptr after the function call, you know nothing was assigned.
Make sure you assign an initial value (nullptr) before calling the function. Then if it is still nullptr after the function call, you know nothing was assigned.
What is that SPErr in SPErr PIUGetInfo(...?
What value does that function return?
Returns an int, but it always returns 0, unless a document is not open (I have documents open but I need to check if they have files attached to them and not a "new" document).
So I am unable to use it in this case. Setting the handle to nullptr and checking if it's been assigned after works in my case.