Good tutorial on Windows API

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jarod_24

    #1

    Good tutorial on Windows API

    I've been using a lot of <DllImports> as of late and i was wondering if
    anyone could tell me a good tutorial/website/articles/books
    that explains what System.Marshal* * actually does and how to make those
    structures that some windows api methods need passed in/out.

    So far i've used mostly methods that send in/out strings, bool, integer and
    so on, easy to convert into CLR types, but some methods need structures and
    some of these have quite some exotic <parameters> set. How do people know
    when that is needed to be set is a mystery to me (i would like to learn it).

    Example:

    <StructLayout(L ayoutKind.Seque ntial)> _
    Public Structure StartUpInfo
    Public cb As Integer
    <MarshalAs(Unma nagedType.LPTSt r)> Public lpReserved As String
    <MarshalAs(Unma nagedType.LPTSt r)> Public lpDesktop As String
    ....



    this article was great:
    http://msdn.microsoft.com/library/de...07/NET/toc.asp


  • Brooke

    #2
    Re: Good tutorial on Windows API

    Good website for both C# and VB




    "Jarod_24" <jarod_24@hotma il.com> wrote in message
    news:43db3a4e$0 $3737$6d36acad@ titian.nntpserv er.com...[color=blue]
    > I've been using a lot of <DllImports> as of late and i was wondering if
    > anyone could tell me a good tutorial/website/articles/books
    > that explains what System.Marshal* * actually does and how to make those
    > structures that some windows api methods need passed in/out.
    >
    > So far i've used mostly methods that send in/out strings, bool, integer
    > and so on, easy to convert into CLR types, but some methods need
    > structures and some of these have quite some exotic <parameters> set. How
    > do people know when that is needed to be set is a mystery to me (i would
    > like to learn it).
    >
    > Example:
    >
    > <StructLayout(L ayoutKind.Seque ntial)> _
    > Public Structure StartUpInfo
    > Public cb As Integer
    > <MarshalAs(Unma nagedType.LPTSt r)> Public lpReserved As String
    > <MarshalAs(Unma nagedType.LPTSt r)> Public lpDesktop As String
    > ...
    >
    >
    >
    > this article was great:
    > http://msdn.microsoft.com/library/de...07/NET/toc.asp
    >
    >[/color]


    Comment

    Working...