Hello,

I'm trying to ccall my DLL as follows :

function start(args :: Array{String, 1})
    return ccall((:TestFunction, "mydll.dll"), Int32, (Int32, Ptr{Ptr{UInt8
}}), length(args), args)    
end

The C declaration is as follows :

extern int TestFunction(int argc, char * argv[]);

The problem is path in argv is escaped in strange way.

   1. When args is ["C:\\Users\\aaa\\bbb"], TestFunction() receives 
   "C:\\Users\\aaa\\bbb". Backslashes are repeated.
   2. When args is ["C:/Users/aaa/bbb"], TestFunction receives 
   "C:\/Users\/aaa\/bbb". Slashes are escaped by backslashes.
   3. When args is ["C:\Users\aaa\bbb"], Julia says "ERROR: syntax: invalid 
   escape sequence".
   
Could you please tell me how I can pass correct path string to my DLL ?
The Julia version is 0.5.0

Thank you in advance.

Nakayama Shintaro

Reply via email to