Xbasse++ UuidFromString() -> FiveWin )

Xbasse++ UuidFromString() -> FiveWin )

Postby Jimmy » Sat May 27, 2023 9:43 pm

hi,

i have this under Xbase++
Code: Select all  Expand view
#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
User avatar
Jimmy
 
Posts: 1699
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: Xbasse++ UuidFromString() -> FiveWin )

Postby Antonio Linares » Sun May 28, 2023 9: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
User avatar
Antonio Linares
Site Admin
 
Posts: 41858
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Xbasse++ UuidFromString() -> FiveWin )

Postby Jimmy » Mon May 29, 2023 4:00 am

hi,

sorry i made a Mistake
UuidFromString() is not a Xbase++ Function, it is from 3-PP Ot4XB LIB

Code: Select all  Expand view
//------------------------------------------------------------
//  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: Select all  Expand view
#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
User avatar
Jimmy
 
Posts: 1699
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: Xbasse++ UuidFromString() -> FiveWin )

Postby Antonio Linares » Mon May 29, 2023 6:11 am

Dear Jimmy,

Code: Select all  Expand view
HB_FUNC( UUIDFROMSTRING )
{
   UUID Id;

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41858
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Xbasse++ UuidFromString() -> FiveWin )

Postby Jimmy » Mon May 29, 2023 5:53 pm

hi Antonio,

thx for Answer
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1699
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: dtoledo, Google [Bot], nageswaragunupudi and 51 guests