Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 20 MAY 2022 01:08:16AM cmeyer wrote:

Is there a way of determining a UNC path?

The Utility("CHOOSEDIR",….) or RTI_OS_DIRECTORY('CHOOSE',….) returns the mapped network drive. Unfortunately most of the clients do NOT have network discovery enabled (security issue) and therefore do not have access to all network functionality.

I have a dropdown to select a folder and would like the result to display the UNC path instead on the mapped drive.

Any advice would be grateful.

Chris


At 20 MAY 2022 08:22AM bob carten wrote:

There is a windows api function named WNETGET_UNIVERSALNAME which is supposed to do that.

See snippet below.

Function test_rti_WNetGetUniversalName(path)

/*

* Make sure that yuyou have the following function protype record In sysprocs as DLL_MPR

* Line 1 is MPR

* 



MPR



ULONG STDCALL WNetGetUniversalNameA( LPASTR, ULONG, LPBINARY, LPULONG ) as winAPI_WNetGetUniversalNameA

ULONG STDCALL WNetGetUniversalNameW( LPWSTR, ULONG, LPBINARY, LPULONG ) as winAPI_WNetGetUniversalNameW

ULONG STDCALL WNetGetUniversalNameW( LPWSTR, ULONG, LPBINARY, LPULONG ) as  winAPI_WNetGetUniversalName



* from sysprog, run declare_FCNS  DLL_MPR





*/





If Assigned(path) Else path = ''

Declare Function rti_WNetGetUniversalName

ans = rti_WNetGetUniversalName(path)

Return ans

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/54791a3be51a244eb9794ce7d8f72872.txt
  • Last modified: 2024/01/04 20:57
  • by 127.0.0.1