Single instance on a Smartphone (not true with .NET)

C

Chris Tacke, eMVP

Apparently not always the case, as Sylvain discovered. There's something to
be said for explicitly setting even things that are the default (or at least
that you think is the default).

--
Chris Tacke
Co-founder
OpenNETCF.org
Has OpenNETCF helped you? Consider donating to support us!
http://www.opennetcf.org/donate


Sergey Bogdanov said:
Strange... from [1]:
"true to indicate that the callee will call SetLastError; otherwise,
false. The default is false, except in Visual Basic."

[1]
http://msdn.microsoft.com/library/d...sdllimportattributeclasssetlasterrortopic.asp

Best regards,
Sergey Bogdanov
http://www.sergeybogdanov.com


Daniel said:
VB sets it by default only when you are using Declare afaik

Cheers
Daniel
 
D

Daniel Moth

Either my memory serves me wrong (won't be the first time) or the
documentation is wrong. Anyone care to prove one or the other (or has
Sylvain already done that)?

Cheers
Daniel
--
http://www.danielmoth.com/Blog/


Sergey Bogdanov said:
Strange... from [1]:
"true to indicate that the callee will call SetLastError; otherwise,
false. The default is false, except in Visual Basic."

[1]
http://msdn.microsoft.com/library/d...sdllimportattributeclasssetlasterrortopic.asp

Best regards,
Sergey Bogdanov
http://www.sergeybogdanov.com


Daniel said:
VB sets it by default only when you are using Declare afaik

Cheers
Daniel
 
S

Sergey Bogdanov

I have just tested it again it seems documentation is incorrect. The
SetLastError parameter must be explicitly set to receive the last error
from Marshal.GetLastWin32Error.

Best regards,
Sergey Bogdanov
http://www.sergeybogdanov.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top