about external methods

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

    about external methods

    following the C# specification:

    "Use the extern modifier in a method declaration to indicate that the method is implemented externally. A common use of the extern modifier is with the DllImport attribute."

    "When an external method includes a DllImport attribute, the method declaration must also include a static modifier."

    Somebody can tell me or give me an example or url that shows me how implement extern modifier without the DllImport attribute ????? Is possible to use the extern modifier if the static modifier isn't ??

    thanks
  • carlos medina

    #2
    Re: about external methods

    thanks mattias

    "Mattias Sjögren" <mattias.dont.w ant.spam@mvps.o rg> wrote in message news:uGdeKWSWDH A.1872@TK2MSFTN GP12.phx.gbl...[color=blue]
    > Carlos,
    > [color=green]
    > >Somebody can tell me or give me an example or url that shows me how implement extern modifier without the DllImport attribute ?????[/color]
    >
    > Microsoft uses it to implement internalcall methods in the BCL. Check
    > out the Rotor sources at
    >
    > http://sharedsourcecli.sscli.net/sou...i/clr/src/bcl/
    >
    > [color=green]
    > >Is possible to use the extern modifier if the static modifier isn't ??[/color]
    >
    > Yes, for example System.Object.G etHashCode() is an instance method
    > declared extern.
    >
    >
    >
    > Mattias
    >
    > --
    > Mattias Sjögren [MVP] mattias @ mvps.org
    > http://www.msjogren.net/dotnet/
    > Please reply only to the newsgroup.[/color]

    Comment

    • carlos medina

      #3
      Re: about external methods

      thanks mattias

      "Mattias Sjögren" <mattias.dont.w ant.spam@mvps.o rg> wrote in message news:uGdeKWSWDH A.1872@TK2MSFTN GP12.phx.gbl...[color=blue]
      > Carlos,
      > [color=green]
      > >Somebody can tell me or give me an example or url that shows me how implement extern modifier without the DllImport attribute ?????[/color]
      >
      > Microsoft uses it to implement internalcall methods in the BCL. Check
      > out the Rotor sources at
      >
      > http://sharedsourcecli.sscli.net/sou...i/clr/src/bcl/
      >
      > [color=green]
      > >Is possible to use the extern modifier if the static modifier isn't ??[/color]
      >
      > Yes, for example System.Object.G etHashCode() is an instance method
      > declared extern.
      >
      >
      >
      > Mattias
      >
      > --
      > Mattias Sjögren [MVP] mattias @ mvps.org
      > http://www.msjogren.net/dotnet/
      > Please reply only to the newsgroup.[/color]

      Comment

      Working...