Friday, July 22, 2011

proper use of libcall

Hi,
I hope that you can help me with this. I'm trying to utilize the vim
libcall function and have written a basic dll in VS2010 C# that looks
like this:

==========================
using System;

namespace MyFirstDLL
{
public class Class1
{
public static string GetCharacters(string input)
{
return input;
}
}
}
==========================

The platform target is x86 with .NET Framework 2.0 . To test it, I
called it from another program and verified that it worked there. The
dll was copied to 'C:\Program Files\Vim\vim73' and the vimcommand

:echo filereadable($VIMRUNTIME.'/MyFirstDLL.dll')

returns '1' .

However, calling libcall produces 'E364: Library call failed for
"GetCharacters()"'.

I've tried several variations from the help file and haven't found a
winner yet.
:echo libcall("MyFirstDLL", "GetCharacters", "Rio Grande")
:echo libcall($VIMRUNTIME.'/MyFirstDLL.dll', 'GetCharacters', 'Rio
Grande')
:echo libcall('MyFirstDLL', 'GetCharacters', 'Rio Grande')

Can anyone help me on this?
Thanks

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment