Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

howto add an API function


1 reply to this topic

Thomas Erdmann

Thomas Erdmann
  • Members
  • 5 posts

Posted 29 May 2002 - 14:14

Hello,

I need the Computer name during the installation and I was reading that an API function with the the name "GetComputerName" exist in the kernel32.dll.

BUT how I can use that function? What I have to define that I can use it?

Thank you forward for help..

Thomas from Germany

nickong

nickong
  • Members
  • 3 posts

Posted 30 May 2002 - 09:22

prototype POINTER wsock32.gethostname(BYREF STRING, NUMBER);
STRING szHostName;

UseDLL ("wsock32.dll");
pWinSockReturn = gethostname(szHostName,100);

Then , u can retrieve Hostname from variable pWinSockReturn !

good luck


nickong