Hi all,
I wanted to launch hypermesh as a server and my client will send various requests to the server.
***********************************************************************************************************************************
SERVER CODE : HM_Server.tcl
set LogFile [open C:/temp/tcl_out.txt w]
proc Server {channel clientaddr clientport} {
global LogFile
puts $LogFile 'Hello'
}
set chanID [socket -server Server 30000]
puts $chanID
***********************************************************************************************************************************
I'm launching the hmopengl.exe using ShellExecuteEx method.
***********************************************************************************************************************************
CLIENT CODE
//Format the command line parameter to be passed for HM in batch mode
TCHAR* cmdLineParam = TEXT('-tcl C:/HM/Tcl_Scripts/HM_Server.tcl');
//Execute the hypermesh in batch mode and wait for it to complete
HINSTANCE hInst = 0;
SHELLEXECUTEINFO ShExecInfo = {0};
ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
ShExecInfo.fMask = SEE_MASK_DEFAULT;
ShExecInfo.hwnd = GetSafeHwnd();
ShExecInfo.lpVerb = TEXT('Open');
ShExecInfo.lpFile = TEXT('C:\\Program Files\\Altair\\12.0\\hm\\bin\\win64\\hmopengl.exe');
ShExecInfo.lpParameters = cmdLineParam;
ShExecInfo.lpDirectory = NULL;
ShExecInfo.nShow = SW_SHOWNORMAL;
ShExecInfo.hInstApp = hInst;
ShellExecuteEx(&ShExecInfo);
***********************************************************************************************************************************
The above code is working fine with hmopengl.exe
where as it is not working with hmbatch.exe [ ShExecInfo.lpFile = TEXT('C:\\Program Files\\Altair\\12.0\\hm\\bin\\win64\\hmbatch.exe') ];
I could not find the issue...