Bug 312552 (MONO45898) - P\Invoke cannot implement attriube DllImportAttribute.SetLastError
Summary: P\Invoke cannot implement attriube DllImportAttribute.SetLastError
Status: RESOLVED FIXED
Alias: MONO45898
Product: Mono: Runtime
Classification: Mono
Component: misc (show other bugs)
Version: unspecified
Hardware: Other Other
: P3 - Medium : Enhancement
Target Milestone: ---
Assignee: Mono Bugs
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords: theme
Depends on:
Blocks:
 
Reported: 2003-07-07 04:38 UTC by He HongFu
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
Source file (1.60 KB, text/plain)
2003-07-07 04:38 UTC, Thomas Wiest
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 18:12:35 UTC


---- Reported by hfhe@stryon.com 2003-07-06 21:38:03 MST ----

Please fill in this template when reporting a bug, unless you know what 
you are doing.
Description of Problem:
Call unmanaged function with P\Invoke, and assigned  attriube 
DllImportAttribute.SetlastError, but cannot implement attriube 
DllImportAttribute.SetLastError

Steps to reproduce the problem:
1. Declare a funtion prototype to call unmanaged library
2. Assigned attribute DllImportAttribute.SetlastError
3. Call this function

Actual Results:
The last error before MessageBox is called: 0
Calling MessageBox with wrong parameters...
Call result: 24271400
The last error after MessageBox is called: 0
Error message: The operation completed successfully.

Expected Results:
The last error before MessageBox is called: 126
Calling MessageBox with wrong parameters...
Call result: 0
The last error after MessageBox is called: 1438
Error message: Invalid message box style.

How often does this happen? 
Each time

Additional Information:



---- Additional Comments From hfhe@stryon.com 2003-07-06 21:38:23 MST ----

Created an attachment (id=164781)
Source file




---- Additional Comments From vargaz@freemail.hu 2003-10-13 12:14:19 MST ----

Fixed in CVS.

Imported an attachment (id=164781)

Unknown bug field "cf_op_sys_details" encountered while moving bug
   <cf_op_sys_details>Windows2000</cf_op_sys_details>
Unknown operating system unknown. Setting to default OS "Other".