Bug 444120

Summary: Use of Alias in Declare Function does not work
Product: [Mono] Mono: Compilers Reporter: Ciaran Gultnieks <ciaran>
Component: BasicAssignee: Rolf Kvinge <rkvinge>
Status: RESOLVED FIXED QA Contact: Mono Bugs <mono-bugs>
Severity: Normal    
Priority: P3 - Medium    
Version: 1.9   
Target Milestone: ---   
Hardware: i386   
OS: Ubuntu   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Ciaran Gultnieks 2008-11-12 11:13:26 UTC
For example, definitions such as this:

Declare Ansi Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hWnd As IntPtr, ByVal lpClassName As String, ByVal nMaxCount As Int32) As Int32


give a compile error when there is an Alias present, but work fine otherwise.

A workaround is to use the <DllImport> syntax instead.
Comment 1 Ciaran Gultnieks 2008-11-13 20:53:41 UTC
See also bug #444811
Comment 2 Rolf Kvinge 2008-11-17 12:14:37 UTC
Fixed in r118998.