Hi all,
I've created an ActiveX dll that I call from an .asp page, which is supposed to launch a program on the server such as Internet Explorer. The problem is, that when the .asp is called, only a process for that program (iexplore.exe) gets launched. There is no visible form/window for it! I've tried so many different things, and I can not get it to work. Here's the little code:
Code:
Option Explicit
'Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Const SW_NORMAL As Long = 1
Public Sub LaunchIENow()
'Dim pid&
'pid = Shell("C:\Program Files\Internet Explorer\iexplore.exe http://www.amazon.com", vbNormalFocus)
'pid = Shell("C:\launchIE.bat", vbNormalFocus)
'Shell "rundll32.exe url.dll,FileProtocolHandler http://www.google.com"
'ShellExecute Me.hwnd, vbNullString, "http://www.google.com", vbNullString, "C:\", SW_SHOWNORMAL
'pid& = ShellExecute(0, vbNullString, "http://www.google.com", "C:\", SW_SHOWNORMAL)
'Shell "explorer.exe http://www.google.com", vbNormalFocus
ShellExecute vbNull, "open", "C:\winnt\notepad.exe", vbNullString, vbNullString, SW_NORMAL
End Sub
As you can tell, I've tried many different things to get this work including trying to launch just the simple notepad program, but I get the same result every time.
And here's the .asp page that calls this little uncooperating monster .dll:
Code:
<%Option Explicit
Dim oLaunchIE 'Create an object for the component
Set oLaunchIE = CreateObject("Cygnus.LaunchIE")
oLaunchIE.LaunchIENow
Set oLaunchIE = Nothing
%>
Thanks in advance!