lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hello Mike,

Monday, December 4, 2006, 8:03:51 PM, you wrote:

MP> Can anybody else reproduce this? Which of the package.cpath
MP> components causes this? IMHO ".\\?.dll" should not trigger the
MP> standard search strategy according to the docs.

My system is Windows XP SP2 , Microsoft Windows XP [版本 5.1.2600])

1. Create an empty file named "console.c" and then use VC6 to build it.
    cl /LD console.c
    This will produce a console.dll

2. Create a simple test program:
-----------------
/*
  test.c

  CL test.c /link /subsystem:console

  */
#include <windows.h>
#include <stdio.h>

int main()
{
        printf("%x",LoadLibrary(".\\console.dll"));
        return 0;
}
-----------------

this will load .\console.dll and print its handle.

3. put console.dll and test.exe in the same directory, like c:\test

If I run test.exe . I got "10000000".
-------------------
  C:\test>test
  10000000
------------------

But if I put test.exe in other directory, like c:\ . and run it

--------------
  C:\test>c:\test
  6e860000
--------------

the console.dll loaded is not mine (in current directory c:\test) .

-- 
Best regards,
 cloudwu                            mailto:cloudwu@163.com
            http://blog.codingnow.com

[凡是有良好教养的人有一禁诫:勿发脾气]