December 11, 2024, 10:43:08 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


GetComputerName implementation

Started by Haim, February 09, 2008, 02:15:32 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Haim

Hi,
Can anyone show me how to implement the GetComputerName Windows API in Aurora?

Thanks,

Haim

pistol350

Hi Haim!

I've found this Ebasic routine from the program "Artificial inteligence" by Piet Defoe

'********************  Find Computer name skanked from help 
Sub FindComputerName 
Def pSize:Pointer 
Def nSize:Int 
Declare "Kernel32",GetComputerNameA(buffer:String,size:Pointer),Int 
nSize = 255 
pSize = nSize 
GetComputerNameA(ComputerNameB,pSize) 
ComputerName = LCase$( ComputerNameB )   
return
endsub


Hope this can help.
Regards,

Peter B.

Haim