I looked the DLL dependencies via MS depends.exe, and found my compiled DLL
depends on msvcrt.dll, but my gvim.exe does not have msvcrt.dll in the
direct dependency list (although some system module like shell32.dll
depends on it).

And I use procexp tool to view the module list of the running gvim, and
only the system defualt msvcrt.dll in the list.

my gvim 7.3 is installed by the package from vim.org. I tried your codes
and still nothing showed, whatever I use gcc or cl.exe to compile.

2013/2/20 mattn <[email protected]>

> On Wednesday, February 20, 2013 12:06:05 AM UTC+9, Jian wrote:
> > According to MSDN, GetDOSEnvironment is 16bit-windows API and does not
> exist on 32bit-windows. I tried GetEnvironmentVariable() in my DLL but it
> still does not work.
> >
>
> I make sure this.
>
> created dll with:
>
> === foo.c
> --------------------------
> __declspec(dllexport)
> char* foo(const char* name) {
>   return getenv(name);
> }
> --------------------------
>
> gcc -shared -o foo.dll foo.c
>
> === foo.vim
> --------------------------
> let s:libfile = substitute(expand('<sfile>'), '.vim$',
> (has('win32')||has('win64'))?'.dll':'.so', '')
> let $FOO=localtime()
> echo libcall(s:libfile, "foo", "FOO")
> --------------------------
>
> And :so % on foo.vim
>
> I get correct values. Probably, your dll is not depend on same msvcrt.dll
> which vim is used.
>
> --
> --
> You received this message from the "vim_dev" 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
>
> ---
> You received this message because you are subscribed to the Google Groups
> "vim_dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
You received this message from the "vim_dev" 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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Raspunde prin e-mail lui