Okay. You can attach your source if you think so, 
I'm sure it helps Przemek.
Something is definitely wrong with the list.

I've sent a msg to Phil.

Brgds,
Viktor

On 2010 Feb 19, at 18:59, Xavi wrote:

> Hi Viktor,
> 
> Ok, without nStatus.
> I wait to see Przemek's changes.
> The development list is still not working.
> 
> Przemek,
> All information is provided by GetAdaptersInfo() in Windows.
> It would be nice to have the MAC address on other OS.
> 
> Best regards,
> Xavi
> 
> El 19/02/2010 18:31, Viktor Szakáts escribió:
>> Hi Xavi,
>> 
>> That's good, but pls work together with Przemek,
>> to offer a multiplatform solution in one portable
>> core function. And use hbwin only to provide the
>> extra functionality, if and only if those cannot
>> be done in portable way.
>> 
>>> PRG .-
>>> aAdapters := win_GetAdaptersInfo()
>>> aAdapters == { {cTipo, cNameDes, cMAC, cAddress, cMask, cGateway, cAdapter, 
>>> nStatus} }
>>> Sort by nStatus.
>>> 
>>> C .-
>>> DWORD hbwin_GetAdaptersInfo( PHB_ITEM pItmArray )
>>> 
>>> File .-
>>> contrin/hbwin/win_getadt.c
>>> 
>>> It need .-
>>> #include<Iphlpapi.h>
>>> 
>>> Also I've an added nStatus to try sort it by relevance.
>>> I don't know whether to bring it or not? .-
>>> ...
>>>      pMacro = hb_macroCompile( "{|x,y|x[8]>y[8]}" );
>>>      if( pMacro  ){
>>>         hb_macroRun( pMacro ); hb_macroDelete( pMacro );
>>>         pCodeBlock = hb_stackItemFromTop( -1 );
>>>         if( pCodeBlock&&  HB_IS_BLOCK( pCodeBlock ) ){
>>>            hb_arraySort( pItmArray, NULL, NULL, pCodeBlock );
>>>         }
>>>         hb_stackPop();
>>>      }
>>> ...
>> 
>> I think such sorting is best to be done by the caller if
>> necessary. IMO it's not very good to make such low-level
>> code dependent on macro compiler, or make any internal
>> automatic sorting whatsoever (you can leave pCodeblock
>> to NULL), since it can be solved easily on .prg level,
>> thus it's redundant.
>> 
>> Brgds,
>> Viktor
>> 
>> 

_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to