Skip to content

Instantly share code, notes, and snippets.

@dockimbel
Created October 11, 2016 12:36
Show Gist options
  • Save dockimbel/fac96187c44a5e15beecbbd441075c57 to your computer and use it in GitHub Desktop.
Save dockimbel/fac96187c44a5e15beecbbd441075c57 to your computer and use it in GitHub Desktop.
Red []
#system [
#import [
"shell32.dll" stdcall [
ShellExecute: "ShellExecuteW" [
hwnd [integer!]
lpOperation [c-string!]
lpFile [c-string!]
lpParameters [integer!]
lpDirectory [integer!]
nShowCmd [integer!]
return: [integer!]
]
]
]
]
browse: routine [url [url!]][
probe ShellExecute 0 #u16 "open" unicode/to-utf16 as red-string! url 0 0 1
]
browse http://github.com/red/red
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment