UNC path (OpenInsight 32-bit)
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