18 Jun
2009
18 Jun
'09
9:22 a.m.
On 16/06/2009 21:19, Bulat Ziganshin wrote:
Hello Simon,
Tuesday, June 16, 2009, 5:02:43 PM, you wrote:
I don't know how getArgs fits in here - should we be decoding argv using the ACP?
myGetArgs = do alloca $ \p_argc -> do p_argv_w<- commandLineToArgvW getCommandLineW p_argc argc<- peek p_argc argv_w<- peekArray (i argc) p_argv_w mapM peekTString argv_w>>= return.tail
foreign import stdcall unsafe "windows.h GetCommandLineW" getCommandLineW :: LPTSTR
foreign import stdcall unsafe "windows.h CommandLineToArgvW" commandLineToArgvW :: LPCWSTR -> Ptr CInt -> IO (Ptr LPWSTR)
Presumably we'd also have to remove the +RTS ... -RTS in Haskell if we did this, correct? Cheers, Simon