Quantcast
Channel: SCN: Message List - PowerBuilder Developer Center
Viewing all articles
Browse latest Browse all 7329

Re: How to Get UNC from a WCF service ??

$
0
0

Hi

I tried this

function ulong WNetGetConnection( string szLocalPath, &

   ref string szNameBuffer,  ref ulong lpBufferSize) Library "mpr.dll"

 

string    ls_tmp, ls_unc,ls_return

          Ulong     ll_rc, ll_size

          ls_tmp = upper(left(as_path,2))

          IF right(ls_tmp,1) <> ":" THEN

                    return   as_path

          end if

 

 

          ll_size = 255

          ls_unc = Space(ll_size)

 

 

          ll_rc = WNetGetConnection(ls_tmp, ls_unc, ll_size)

          IF  ll_rc = 2250 THEN

                    // prbably local drive

                    return  + as_path

          END IF

 

 

          IF ll_rc <> 0 THEN

  

            return  + as_path

          END IF

 

 

          // Concat and return full path

          IF len(as_path) > 2 THEN

             ls_unc = ls_unc + mid(as_path,3)

          END IF

 

But it is not working


Viewing all articles
Browse latest Browse all 7329

Trending Articles