Re: Writing a library for .NET ?

From: Marc Rohloff (marcrohloff_ng_at_bigfoot.com)
Date: 08/26/04


Date: 26 Aug 2004 06:10:48 -0700


"Skybuck Flying" <nospam@hotmail.com> wrote in message news:<cgj8oa$m3t$1@news3.tilbu1.nb.home.nl>...

> [Error] LibraryTest.dpr(66): Procedure definition must be ILCODE calling
> convention
> No where in the help does it say how to do that ?
No the documentation is still catching up. Either leave the calling
convention off or specify ilcode instead of stdcall.

> If I remove stdcall it says this:
> [Error] LibraryTest.dpr(81): Unsafe procedure only allowed if compiling with
> {$UNSAFECODE ON}
Creating DLL exports functions from a .NET library is inherintly
unsafe and discouraged by Microsoft. The compiler is just forcing you
to acknowledge this.

The real point of libraries is to make whole classes available. If you
do this then you will not need to mark your code as unsafe.

Marc Rohloff
--TeamB



Relevant Pages

  • Re: Writing a library for .NET ?
    ... > convention off or specify ilcode instead of stdcall. ... > do this then you will not need to mark your code as unsafe. ... And I still want to use all my delphi non-OO code in .NET ...
    (alt.comp.lang.borland-delphi)
  • Re: Writing a library for .NET ?
    ... > convention off or specify ilcode instead of stdcall. ... > Creating DLL exports functions from a .NET library is inherintly ... > do this then you will not need to mark your code as unsafe. ...
    (alt.comp.lang.borland-delphi)
  • Re: Mixed stdcall and cdecl code
    ... >> convention. ... I link to a 3rd party static library that apparently uses the ... >> errors from the linker until I changed my project settings from stdcall ... The 3rd party did not explicitly declare a calling convention in ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: moving data from one place to another in a text file
    ... """Calling DLL's under Windows ... the Pascal convention. ... used by a DLL just try one. ... that we're calling 'routine1' which expects a number as its first ...
    (comp.lang.cobol)
  • Re: pipe(2) calling convention: why?
    ... which uses a generic calling convention to implement pipe. ... we have one syscall and ... some arch-dependend wrappers in the libc. ...
    (freebsd-arch)