Hello,
it exist a function in the KERNEL32.dll calls "GetComputerName" and I started with that:
prototype POINTER kernel32.GetComputerName(BYREF STRING, NUMBER);
And for using:
string szString;
NUMBER nvReturn, nSize;
begin
UseDLL ("kernel32.dll");
nSize = 16;
nvReturn = GetComputerName(szString,nSize);
end;
But I always get a error and it is closing the setup, even I'm debugging but that doesnt matter...
It is saying: function ... terminated - closing Setup..
I was trying to use a other function in the same DLL and that was ok, it works, but that function I need doesnt work..
Can someone help me again or maybe the function is working by you?
thx forward..
Thomas
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.
GetComputerName in Kernel32.dll
Started by
Thomas Erdmann
, May 31 2002 12:56
2 replies to this topic
Posted 12 June 2002 - 17:12
try:
prototype BOOL KERNEL32.GetComputerName ( BYREF STRING, BYREF NUMBER );
ensure a larger buffer (I use 101)
Remove UseDLL ("kernel32.dll");
prototype BOOL KERNEL32.GetComputerName ( BYREF STRING, BYREF NUMBER );
ensure a larger buffer (I use 101)
Remove UseDLL ("kernel32.dll");
Posted 13 June 2002 - 09:17
Ohhhh thanks...
yes now it works fine... I think my problem was the size of the buffer... 101 is perfect..
cu
Thomas
yes now it works fine... I think my problem was the size of the buffer... 101 is perfect..
cu
Thomas