On Sun, Oct 23, 2016 at 1:22 PM, 中山慎太郎 <nky...@gmail.com> wrote: > 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. > > When args is ["C:\\Users\\aaa\\bbb"], TestFunction() receives > "C:\\Users\\aaa\\bbb". Backslashes are repeated. > When args is ["C:/Users/aaa/bbb"], TestFunction receives > "C:\/Users\/aaa\/bbb". Slashes are escaped by backslashes. > 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.
How are you examining it in the C code? > > Nakayama Shintaro