May 23, 2019, 07:19:13 am

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


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

Code Select
'********************  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