Question
IDCS4 Win - Getting a link path
Hello all:<br /><br />In CS3 I used this code to get the image filename of a link:<br /><br />UIDRef linkRef = linksManager -> GetNthLinkUID(link);<br />InterfacePtr<IDataLink> dataLink(linkRef, IID_IDATALINK);<br />PMString *S = Datalink -> GetFullName();<br /><br />// do stuff with S and delete S<br />S = Datalink -> GetBaseName();<br /><br />IDataLink has been deprecated according to the porting guide. Since I could not find any reference anywhere to a cal to a GetFullName, I tried using it anyway since the header is still there. The code looks like this using the new method for retrieving a list of links:<br /><br />InterfacePtr<ILinkManager> linksManager(document, IID_ILINKMANAGER);<br /><br />LinkQuery Query; // I want all links so I leave this blank.<br /><br />// below is just a fancy name for std::vector<br />ILinkManager::QueryResult QueryResult; <br /><br />linksManager -> QueryLinks(Query, QueryResult);<br /><br />linkCount = QueryResult.size();<br /><br />// Work through the links and gather the info needed<br />for(link = 0; link < linkCount; link++)<br /><br />{<br /><br /> // This produces a linkref with a stored UID that makes sense.<br /> UIDRef linkRef = UIDRef(db, QueryResult[link]); <br /><br /> <br /> InterfacePtr<IDataLink> dataLink(linkRef, IID_IDATALINK); <br /> if (dataLink == nil) // evaluated as true<br /><br />Under CS4 what is the correct way to retrieve an image filename through a link?<br /><br />TIA!<br /><br />John