on 05-03-2011 7:34 PM
Does anyone know how to get either the Main Window Handle or the Windows Process ID of the current B1 client session. GetProcessesByName("SAP Business One") will not work if there is more than one B1 Session Open.
Any help is appreciated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Petr,
Thanks for your reply. It appears that your code will get the process id of the addon, but I need the process id of the current instance of SAP Business One. Am I missing something?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Im doing it so:
Dim myProcess As System.Diagnostics.Process = System.Diagnostics.Process.GetCurrentProcess()
Dim ProccessInfo As New Process_Basic_Information
Dim ProcHandle As IntPtr = Process.GetProcessById(myProcess.Id).Handle
Dim RetLength As UInteger
NtQueryInformationProcess(ProcHandle, PROCESSBASICINFORMATION, ProccessInfo, Marshal.SizeOf(ProccessInfo), RetLength)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.