Ovidiu,

>or to find out whether the
>PInvoke manager in .NET can handle subtle type mismatches; for example, I
>need to know whether CreateFile(string, uint, ...) is the same with
>CreateFile(string, int, ...); does the sign bit matter or is size the only
>important thing? (I mean the number of bits, of course ;-)

The sign bit only matters to the one interpreting the number, it doesn't 
affect marshaling.


>Also, I want to know how to choose between ref and out parameters.

That's usually obvious from reading the documentation. If you need to pass 
anything in to the function, use ref. Otherwise, if the parameter is only 
for output, use out so you don't have to waste time initializing the local 
variable and to potentially improve marshaling performance.


Mattias

===
Mattias Sjögren
[EMAIL PROTECTED]

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to