Re: ClojureCLR PInvoke and DLLImport attribute

2011-12-02 Thread dmiller
Fiel's problem was a little simpler -- his dllimport method was out in C# class that was imported. The problem appears to be that reflection is not finding the method. That is likely either a signature-matching problem (declared args vs supplied params) or even just having the flags set a little w

Re: ClojureCLR PInvoke and DLLImport attribute

2011-12-02 Thread Timothy Baldridge
> If you could give me a small example of how you would like to use > this, I can take a look. I suggest you read Miguel de Icaza's blog entry here about using dynamic and pinvoke. The concept is quite simple. Basically you have to generate a method on-the-fly and tag it with the correct attribut

Re: ClojureCLR PInvoke and DLLImport attribute

2011-12-01 Thread dmiller
Not supported at present. I'd have to think a little about it, but at first glance, it seems doable. I've not look under the surface at how the CLR handles PInvoke via DLLImport, so some investigation is required. Attributes are supported on method defs in various places (but not yet documented)

ClojureCLR PInvoke and DLLImport attribute

2011-12-01 Thread Fiel Cabral
Does ClojureCLR support PInvoke and the DLLImport attribute or something similar? (e.g., from PInvoke.net) DllImport("crypt32.dll", EntryPoint = "CertGetNameString", CharSet = CharSet.Auto, SetLastError = true)] static extern System.UInt32 CertGetNameString(IntPtr CertContext, System.UInt32 lType,