IonicWind Software

Aurora Compiler => Coding Help - Aurora 101 => Topic started by: Haim on February 09, 2008, 02:15:32 AM

Title: GetComputerName implementation
Post by: Haim on February 09, 2008, 02:15:32 AM
Hi,
Can anyone show me how to implement the GetComputerName Windows API in Aurora?

Thanks,

Haim
Title: Re: GetComputerName implementation
Post by: pistol350 on February 09, 2008, 05:25:35 AM
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.
Title: Re: GetComputerName implementation
Post by: Haim on February 09, 2008, 07:13:51 AM
Thanks,
i'll try to convert it1

Haim