Hi all,
I am using this code to get th ProcessID of newly Created Excel.
This code returns the Process ID Correctly with Virtual ServerCode:Imports Microsoft.VisualBasic Imports Microsoft.Office.Interop Public Class Class1 <Runtime.InteropServices.DllImport("user32.dll", SetLastError:=True)> _ Private Shared Function GetWindowThreadProcessId(ByVal hwnd As Integer, _ ByRef lpdwProcessId As Integer) As Integer End Function Private processId As Integer Sub New() Dim oExcel As Excel.Application oExcel = CreateObject("Excel.Application") GetWindowThreadProcessId(oExcel.Hwnd, processId) oExcel.Quit() System.Runtime.InteropServices.Marshal.ReleaseComObject(oExcel) oExcel = Nothing End Sub End Class
Now I deployed it using a Website, and the ProcessID is 0
Has anyone experienced with this ?




Reply With Quote