编程论坛's Archiver

山淡淡 发表于 2007-3-28 20:57

求教菜鸟问题:nbuf slength是什么意思

FUNCTION boolean GetComputerNameA(ref string cname,ref long nbuf)LIBRARY "Kernel32.dll" alias for "GetComputerNameA;Ansi"<BR>FUNCTION boolean GetUserNameA(ref string uname,ref ulong slength)LIBRARY "advapi32.dll" alias for "GetUserNameA;Ansi"<BR>FUNCTION int GetSystemMetrics(int indexnum)LIBRARY "User32.dll"<BR>我想求教nbuf slength indexnum分别是什么意思,他们的命名规则是什么,谢谢![em13]

山淡淡 发表于 2007-3-28 21:06

还有,获取登陆用户信息,为什么返回值是boolean而不是char或string值

notbig 发表于 2007-3-28 23:25

nbuf slength indexnum
<P>是参数,具体代表什么含义要查API手册<BR>GetUserNameA(ref string uname,ref ulong slength)<BR>此函数结果是布尔值,但UNAME和SLENGTH都是返回值,前面有REF<BR></P>

山淡淡 发表于 2007-3-30 10:25

谢谢版主!<BR>

页: [1]

Powered by Discuz! Archiver 6.1.0  © 2001-2007 Comsenz Inc.