A
awfigsk
Unregistered / Unconfirmed
GUEST, unregistred user!
[red]function _CreateMutex(lpMutexAttributes: PSecurityAttributes;<br> bInitialOwner: Integer; lpName: PChar): THandle; stdcall; external kernel32 name 'CreateMutexA';<br><br>function CreateMutex(lpMutexAttributes: PSecurityAttributes; bInitialOwner: BOOL; lpName: PChar): THandle;<br>begin<br> Result := _CreateMutex(lpMutexAttributes, Integer(Boolean(bInitialOwner)), lpName);<br>end;[/red]<br><br>[blue]function _CreateMutexA(lpMutexAttributes: PSecurityAttributes;<br> bInitialOwner: Integer; lpName: PAnsiChar): THandle; stdcall; external kernel32 name 'CreateMutexA';<br><br>function CreateMutexA(lpMutexAttributes: PSecurityAttributes; bInitialOwner: BOOL; lpName: PAnsiChar): THandle;<br>begin<br> Result := _CreateMutexA(lpMutexAttributes, Integer(Boolean(bInitialOwner)), lpName);<br>end;[/blue]<br>================================<br>像上面这种情况,如果我调用CreateMutexA函数,是执行哪个呢?_CreateMutex和_CreateMutexA都是取别名CreateMutexA。<br>还想问一下,在单元中可以重新定义所引用的API函数吗?如上面两个程序段,就是重新定义了所引用的API函数?