Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9010613
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T02:30:32+00:00 2026-06-16T02:30:32+00:00

Sharepoint 2010 server (on a https-url) and local application on a Windows client The

  • 0

Sharepoint 2010 server (on a https-url) and local application on a Windows client

The local application is our executable written in C++ / C#

On the site we have documents with extention that has been mapped on the client machine to open in our local application
Clicking on such a document presents a popup asking for Open or Save

Selecting Open causes the document to be downloaded and our application is started by windows with the selected file as the command-line parameter
The problem is that the command-line parameter is set to the local path for the downloaded file

Is there a way to fetch the original url?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T02:30:34+00:00Added an answer on June 16, 2026 at 2:30 am

    Found out myself – use WinINet.lib: http://msdn.microsoft.com/en-gb/library/aa383928.aspx

    Include WinINet.lib in project and WinINet.h in source

    #include <wininet.h>
    class CCorrelateAxCtrl::findInCache
    {
    public:
        _bstr_t cachedUrl;
        findInCache(_bstr_t localName)
        {
            _findInCache(localName);
        }
        virtual ~findInCache() {}
    
    private:
        int _continue;
        DWORD _dwEntrySize;
        static const DWORD MAX_CACHE_ENTRY_INFO_SIZE = 4096;
        LPINTERNET_CACHE_ENTRY_INFO _lpCacheEntry;
        HANDLE _hCacheDir;
        _bstr_t _localName;
    
        void _setCachEntry(DWORD dwEntrySize)
        {
            _dwEntrySize = dwEntrySize;
            _lpCacheEntry = (LPINTERNET_CACHE_ENTRY_INFO) new char[_dwEntrySize];
            _lpCacheEntry->dwStructSize = _dwEntrySize;
        }
        bool _checkFound() 
        {
            if ( _lpCacheEntry->lpszLocalFileName!=NULL && _localName.length() )
            {
                if ( !wcscmp(_lpCacheEntry->lpszLocalFileName, _localName) ) {
                    cachedUrl = _lpCacheEntry->lpszSourceUrlName;
                    delete[] _lpCacheEntry;
                    return true;
                }
            }
            return false;
        }
        int _checkContinue(DWORD dwEntrySize) 
        {
            DWORD err = GetLastError();
            if (err)
            {
                if (err == ERROR_INSUFFICIENT_BUFFER)
                {
                    delete[]_lpCacheEntry;
                    _setCachEntry(dwEntrySize);
                    return 2;
                }
                else
                {
                    FindCloseUrlCache(_hCacheDir);
                    return 0;
                }
            }
            return 1;
        }
        void _findInCache(_bstr_t &localName)
        {
            _localName = localName;
            cachedUrl = "";
            _setCachEntry(MAX_CACHE_ENTRY_INFO_SIZE);
            while(1)
            {
                _hCacheDir = FindFirstUrlCacheEntry(NULL, _lpCacheEntry, &_dwEntrySize);
                _continue = _hCacheDir ? 1 : _checkContinue(_dwEntrySize);
                if (_continue!=2)
                    break;
            }
            if ( !_continue || _checkFound() ) 
                return;
    
            _setCachEntry(MAX_CACHE_ENTRY_INFO_SIZE);
    try {
            while(1)
            {
                _continue = FindNextUrlCacheEntry(_hCacheDir, _lpCacheEntry, &_dwEntrySize);
                    _continue = _continue ? 1 : _checkContinue(_dwEntrySize);
                if ( _continue==1 )
                {
                    if ( _checkFound() )
                        break;
                }
                else if (_continue!=2)
                    break;
            }
    }
    catch (char * error)
    {
        _bstr_t test = error;
    }
    
    
    
        }   
    };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have the following Environment: SharePoint server 2010 Windows server 2008 R2 SQL Server
Currently I have a search set up on our Sharepoint 2010 server. The search
I have 2 web application on my sharepoint 2010 server. with port 100 and
We have a mixed (forms and Windows)-based SharePoint 2010 site and I'm attempting to
I have SharePoint 2010 and SQL server 2008 setup on two machines. I have
I have made a site in SharePoint Foundation 2010. I used team site as
Greetings - I have a SharePoint 2010 server running with the User Profile service
Possible or not? I know Sharepoint 2010 Server won't even run on a client
I have a SharePoint 2010 MySites set up on its own web application. There
How to deploy an Application page of Sharepoint 2010 to another production server. I've

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.