You are not logged in.
Pages: 1
I can't seem to get this to return anything other than 0
Dim wshShell, errRun : Set wshShell = WScript.CreateObject("WScript.Shell")
errRun = wshShell.Run("C:\WINDOWS\System32\RUNDLL32.EXE user32.dll IsClipboardFormatAvailable 1")
MsgBox errRun
According to http://msdn.microsoft.com/en-us/library … 85%29.aspx I would expect to get anything other than 0.
Any ideas? This works when invoking Vbscript in Office.
Offline
In VBScript don't think you can use RunDll32.exe to pass arguments to Windows API functions.
In other words your script effectively runs:
RUNDLL32.EXE user32.dll IsClipboardFormatAvailable <NULL>
which always returns 0
There may be some cases where you can workaround this issue by calling a function and passing a command line string, but in general I don't think its supported.
Offline
Pages: 1