FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Xbasse++ UuidFromString() -> FiveWin )
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Xbasse++ UuidFromString() -> FiveWin )
Posted: Sat May 27, 2023 09:43 PM
hi,

i have this under Xbase++
Code (fw): Select all Collapse
#xtranslate ITaskbarList_uuidof()   => UuidFromString("56FDF342-FD6D-11d0-958A-006097C9A090")
#xtranslate ITaskbarList2_uuidof()  => UuidFromString("602D4995-B13A-429b-A66E-1935E44F4317")
#xtranslate ITaskbarList3_uuidof()  => UuidFromString("EA1AFB91-9E28-4B86-90E9-9E9F8A5EEFAF")
#xtranslate ITaskbarList4_uuidof()  => UuidFromString("C43DC798-95D1-4BEA-9030-BB99E2983A1A")
how under Fivewin :?:
greeting,

Jimmy
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Xbasse++ UuidFromString() -> FiveWin )
Posted: Sun May 28, 2023 09:24 AM

Dear Jimmy,

Those xtranslates should work the same using Harbour, so I guess your question is:

How to implement function UuidFromString() ?

Could you please try MsgInfo( ITaskbarList_uuidof() ) with xbase++ (or similar function to MsgInfo()) and let us know what you get ?

thanks

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: Xbasse++ UuidFromString() -> FiveWin )
Posted: Mon May 29, 2023 04:00 AM
hi,

sorry i made a Mistake
UuidFromString() is not a Xbase++ Function, it is from 3-PP Ot4XB LIB
Code (fw): Select all Collapse
//------------------------------------------------------------
//  Project: Open Tools for Xbase++                          -
//  Repository : http://www.xbwin.com                        -
//  Author: Pablo Botella Navarro ( http://www.xbwin.com )   -
//------------------------------------------------------------
#include <ot4xb_api.h>
XPPRET XPPENTRY UUIDFROMSTRING(XppParamList pl)
{          
   ContainerHandle conr = _conNew( NULLCONTAINER);
   LPSTR pBuffer = _pszParam(pl,1);
   if( pBuffer )
   {
      UUID Id;
      LPSTR pStr = pBuffer;
      if(pStr[0] == '{')
      {  
         ULONG n;
         pStr++; 
         for( n=0; pStr[n]; n++){ if( pStr[n] == '}' ) pStr[n] = 0; }
      }
      if( UuidFromString((LPBYTE)pStr,&Id) == RPC_S_OK ) _conPutCL( conr , (LPSTR)&Id,sizeof(UUID)); 
      _xfree((void*) pBuffer);
   }
   _conReturn(pl,conr); _conRelease(conr);
}
i have try this under Xbase++
Code (fw): Select all Collapse
#include "Ot4XB.CH"

#xtranslate ITaskbarList_uuidof()   => UuidFromString("56FDF342-FD6D-11d0-958A-006097C9A090")
#xtranslate ITaskbarList2_uuidof()  => UuidFromString("602D4995-B13A-429b-A66E-1935E44F4317")
#xtranslate ITaskbarList3_uuidof()  => UuidFromString("EA1AFB91-9E28-4B86-90E9-9E9F8A5EEFAF")
#xtranslate ITaskbarList4_uuidof()  => UuidFromString("C43DC798-95D1-4BEA-9030-BB99E2983A1A")

PROCEDURE MAIN

? ITaskbarList_uuidof()
? ITaskbarList2_uuidof()
? ITaskbarList3_uuidof()
? ITaskbarList4_uuidof()
WAIT

RETURN
Result
B¾²Vm²ðòè `ù╔áÉ
òI-`:▒øBªn5õOC
æ¹Û(×åKÉÚ׃è^´»
ÿÃ=─ÐòÛKÉ0╗ÖÔÿ:
greeting,

Jimmy
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Xbasse++ UuidFromString() -&gt; FiveWin )
Posted: Mon May 29, 2023 06:11 AM
Dear Jimmy,
Code (fw): Select all Collapse
HB_FUNC( UUIDFROMSTRING )
{
   UUID Id;

   UuidFromString( ( LPBYTE ) hb_parc( 1 ), &Id );
   hb_retclen( ( LPSTR ) &Id, sizeof( UUID ) );
}
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: Xbasse++ UuidFromString() -&gt; FiveWin )
Posted: Mon May 29, 2023 05:53 PM

hi Antonio,

thx for Answer

greeting,

Jimmy

Continue the discussion