1. Christopher Craft
  2. PowerBuilder
  3. Saturday, 30 September 2023 14:54 PM UTC

PB 2022 1900

I have a window that shows attached files for a transaction using the chromium WebBrowser.  This window will retrieve the file from the database, write it out to ..AppData\Local\Temp\Famous\Doc.pdf and then I fire the Navigate using that exact same entry.  I have recently been notified that some of our builds are not displaying the files in the browser.  The odd part is the file is correctly created in that directory but the Navigate fails to load it.  I know that when connecting to a Remote Desktop session, Windows will create a directory under Temp with your session id (..AppData\Local\Temp\6).  Could this be causing the browser to get confused only on certain servers?

Another thought would be to use the temp session id structure for Remote Desktop.  I am currently calling SHGetSpecialFolderPathW with folder ID of 28 to get the AppData\Local directory then adding 'Temp' but maybe I should be using GetTempPathW instead? (Although I thought there were some potential issues with this as well)

Thanks again for your input on this,

Chris Craft

Accepted Answer
René Ullrich Accepted Answer Pending Moderation
  1. Monday, 2 October 2023 05:36 AM UTC
  2. PowerBuilder
  3. # Permalink

Hi Chris,

I use GetTempPathW and have no problems. It works on local and remote machines.

HTH,

René

 

Comment
  1. Chris Pollach @Appeon
  2. Tuesday, 3 October 2023 14:39 PM UTC
@Chris ... FYI: Function int GetTempPath ( int nBufferLength, Ref string lpBuffer ) Library "kernel32.dll" Alias For "GetTempPathW"
  1. Helpful
  1. Christopher Craft
  2. Wednesday, 4 October 2023 05:02 AM UTC
Thank you René and Chris. I will use the Temp call instead.
  1. Helpful 1
There are no comments made yet.


There are replies in this question but you are not allowed to view the replies from this question.