search for: dllimport

Displaying 20 results from an estimated 165 matches for "dllimport".

2013 Apr 23
0
[LLVMdev] Feedback required on proper dllexport/import implementation
Hi Nico, Reid, and Anton, I missed the discussion when I implemented dllexport/dllimport for our local tree. I essentially implemented your approach#1. I was trying to avoid the various external_linkage + some_attribute approaches because it seems that external_linkage would imply the external linkage without the dllimport/dllexport semantics, and there may be existing compiler codes t...
2013 Mar 26
6
[LLVMdev] Feedback required on proper dllexport/import implementation
Hello, while improving and extending support for dllexport/import I have noticed that the current way these are implemented is problematic and I would like some input on how to proceed. Currently dllexport/dllimport is treated as linkage type. This conflicts with inlined functions because there is no linkage for the combination of both. On first though, combining both doesn't make sense, but take this class as an example: struct __declspec(dllexport/dllimport) X { X() {} }; Such constructs with e...
2014 May 24
2
make dllimport/dllexport attributes work with mingw (and others)
The following patch changes export.h so that the dllimport/dllexport attributes work with mingw/mingw-w64 and others: - changes _declspec keyword to __declspec: the former may not be defined by some toolchains. - changes the _MSC_VER condition to universally _WIN32: MSVC, as well as GCC supports this. Attached patch: declspec.diff Regards. -- O.S. -...
2013 Apr 23
2
[LLVMdev] Feedback required on proper dllexport/import implementation
On 23.04.2013 19:10, Gao, Yunzhong wrote: > I missed the discussion when I implemented dllexport/dllimport for our local tree. I > essentially implemented your approach#1. I was trying to avoid the various > external_linkage + some_attribute approaches because it seems that external_linkage > would imply the external linkage without the dllimport/dllexport semantics, and there > may be exist...
2006 Nov 27
1
R.DLL mapping by P/Invoke
...m.Text; using Microsoft.Win32; namespace SharpR { /// <summary> /// Class for interp with the R.DLL. All is static as R is mono-threaded. /// </summary> class RWrapper { #region <R.DLL interop signatures> //- DLL Management/Information [DllImport("R.DLL", /*CallingConvention = CallingConvention.Cdecl,*/ CharSet = CharSet.Ansi)] [return: MarshalAs(UnmanagedType.LPStr)] static extern string getDLLVersion(); [DllImport("R.DLL", /*CallingConvention = CallingConvention.Cdecl,*/ CharSet = CharSet.Ansi)]...
2007 Oct 17
0
Using R.dll in .NET IPC
...; using Microsoft.Win32; namespace SharpR { /// <summary> /// Class for interp with the R.DLL. All is static as R is mono-threaded. /// </summary> class RWrapper { #region <R.DLL interop signatures> //- DLL Management/Information [DllImport("R.DLL", /*CallingConvention = CallingConvention.Cdecl,*/ CharSet = CharSet.Ansi)] [return: MarshalAs(UnmanagedType.LPStr)] static extern string getDLLVersion(); [DllImport("R.DLL", /*CallingConvention = CallingConvention.Cdecl,*/ CharSet = CharSet.Ansi)]...
2014 May 24
2
make dllimport/dllexport attributes work with mingw (and others)
...> >> - changes the _MSC_VER condition to universally _WIN32: MSVC, as well >> as GCC supports this. > > MSYS/MinGW 4.8.3, 4.9.0 can't compile code from git after this patch: > > format.c:47:22: error: variable 'FLAC__VERSION_STRING' definition is marked > dllimport > FLAC_API const char *FLAC__VERSION_STRING = VERSION; > ^ > format.c:47:22: warning: 'FLAC__VERSION_STRING' redeclared without dllimport > attribute: previous dllimport ignored [-Wattributes] > format.c:49:22: error: variable 'FLAC__VENDOR_STRING...
2007 Feb 09
1
speex in C# please help
...*modename; public int modeid; public int bitstream_version; public IntPtr enc_init; public IntPtr enc_destroy; public IntPtr enc; public IntPtr dec_init; public IntPtr dec_destroy; public IntPtr dec; public IntPtr enc_ctl; public IntPtr dec_ctl; } #endregion #region Exported Methods [DllImport(libpath)] public static extern void *speex_encoder_init(ref SpeexMode modein); [DllImport(libpath,EntryPoint="speex_lib_get_mode")] public static extern IntPtr speex_lib_get_mode (int modein); [DllImport(libpath)] public static extern int speex_encoder_ctl(void *state , int request ,...
2020 Oct 18
1
Lookup sid with libsmbclient (invoked from c# on mono)
...using System; using System.ComponentModel; using System.Diagnostics; using System.Net; using System.Runtime.InteropServices; using System.Security.Principal; namespace PingCastle.ADWS { internal class SambaSidResolver : IDisposable { const int SECURITY_MAX_SID_SIZE = 68; [DllImport("libsmbclient.so.0", CharSet = CharSet.Ansi)] static internal extern IntPtr _talloc_stackframe(string context); [DllImport("libsmbclient.so.0", CharSet = CharSet.Ansi)] internal static extern IntPtr user_auth_info_init(IntPtr mem_ctx); [DllImpor...
2013 May 07
0
[LLVMdev] Feedback required on proper dllexport/import implementation
Hi Nico, Thank you for your feedback. I'll try to answer your questions below. > What problems do you expect with another approach? I have a local > prototype that removes dllimport/export as linkage and uses function > attributes and an extension to globals. I decorate dllexported functions with > the Used attribute and it seems to work fine. This allows such functions to > have linkonce_odr and weak_odr linkage and not be discarded. My primary concern is what needs...
2008 Jul 30
1
Speex in VB .NET
Hi there, I have searched what seems like everywhere and was unable to find a .NET wrapper so that I can use speex in VB. I did find a speex.NET.dll but this didn't seem to work on what I needed. I therefore decided I could just use DllImport within VB .NET and create my own unmanaged links to libspeex.dll. With the help of this partial c# code (http://lists.xiph.org/pipermail/speex-dev/2007-February/005307.html) I created this VB.net class: (I have focused on the decode side of things to start with, until I have it working). Impo...
2007 Jun 14
2
FLAC: library for C#
Harry Sack wrote: > > but aren't they C++ headers en lib's? Not C++, C. > I have no idea how I can include a C++ > header in a C# project. > It this even possible? Yes. Google for "dllimport csharp". Erik -- ----------------------------------------------------------------- Erik de Castro Lopo ----------------------------------------------------------------- "The very definition of hell is having to maintain someone else's Perl code." -- Anonymous
2006 Dec 29
0
using speex in C#
...uot; buffer (member "chars") */ int overflow; /* Set to one if we try to read past the valid data */ int buf_size; /* Allocated size for buffer */ int reserved1; /* Reserved for future use */ void *reserved2; /* Reserved for future use */ } ... /* EXPORTED ENCODER METHODS */ [DllImport("libspeex.dll")] public static extern void *speex_encoder_init_new(int modeID); [DllImport("libspeex.dll")] public static extern int speex_encoder_ctl(void *state, int request, void *ptr); /* default this function doesn't exist but same job is done speex_encoder_ctl functi...
2010 Dec 25
2
[LLVMdev] LLVM dllimport
?Hi all, Can someone tell me how to import functions from shared libraries and use them in LLVM assembly Regards, Dylan Borg +356 99214902 borgdylan at hotmail.com borgdylang at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20101225/77e1182c/attachment.html>
2010 Dec 27
0
[LLVMdev] LLVM dllimport
Hi Dylan, If you have "import libraries", you may call them with general calling conversions. Without import libraries, for example; declare dllimport i32 @foo(i32) @quux = dllimport global i32 define i32 @bar() nounwind { %a = load i32* @quux %r = call i32 @foo(i32 %a) ret i32 %r } .globl _bar _bar: subl $4, %esp movl __imp__quux, %eax movl (%eax), %eax movl %eax, (%esp) calll...
2007 Jun 14
2
FLAC: library for C#
...ource for the time being, but that could be considered. Pyt. PS: If anybody has a real pinvoke wrapper for the reference lib, I'd gladly take it... ! On 6/14/07, Jud White - jwhite@cdtag.com <+flac- dev+pyt+af0255c9db.jwhite#cdtag.com@spamgourmet.com> wrote: > > Harry, > > DllImport is the way to go, but it's not always straightforward what to > do (callbacks, pointers, and structs can get tricky). > http://pinvoke.net/ is a good resource for mapping Win32 API to C# using > DllImport, you may find it useful for your efforts. I also found this > article helpful...
2007 Feb 13
1
Re: Speex-dev Digest, Vol 33, Issue 10
...ublic IntPtr enc_destroy; > > public IntPtr enc; > > public IntPtr dec_init; > > public IntPtr dec_destroy; > > public IntPtr dec; > > public IntPtr enc_ctl; > > public IntPtr dec_ctl; > > } > > #endregion > > #region Exported Methods > > [DllImport(libpath)] > > public static extern void *speex_encoder_init(ref SpeexMode modein); > > [DllImport(libpath,EntryPoint="speex_lib_get_mode")] > > public static extern IntPtr speex_lib_get_mode (int modein); > > [DllImport(libpath)] > > public static extern int...
2014 May 25
1
make dllimport/dllexport attributes work with mingw (and others)
Ozkan Sezer wrote: > flac.exe built with mingw with or without the dllimport/dllexport patch > always requires libFLAC-8.dll (because flac/Makefile.am has libFLAC.la > in flac_LDADD and not libFLAC-static.la), and the patch doesn't make it > any more or any less dependent on any 'foreign' dlls: the patch doesn't > change the existent situation in...
2014 May 25
0
make dllimport/dllexport attributes work with mingw (and others)
...out arguments then flac.exe requires > libFLAC-8.dll, > which in turn requires libgcc_s_sjlj-1.dll. Adding "--disable-shared" makes > flac.exe standalone: it doesn't need those libraries thst are foreign to > Windows systems). flac.exe built with mingw with or without the dllimport/dllexport patch always requires libFLAC-8.dll (because flac/Makefile.am has libFLAC.la in flac_LDADD and not libFLAC-static.la), and the patch doesn't make it any more or any less dependent on any 'foreign' dlls: the patch doesn't change the existent situation in that regard. If I...
2014 May 25
2
make dllimport/dllexport attributes work with mingw (and others)
Erik de Castro Lopo wrote: > Ozkan Sezer wrote: > >> My apologies, obviously sent an old testing patch. Correct one is >> attached (declspec2.diff). Compilation tested using MinGW (gcc-3.4.5, >> binutils-2.20), and MinGW-w64 (gcc-4.5.4, binutils-2.21.90.) > > lvqcl, > > Can you please validate this new patch? It works, but only if i call ./configure without