RunApplication
From PowerBuilder Native Interface
IPB_VM interface:
RunApplication method
Description
Syntax
RunApplication(LPCTSTR applicationName, LPCTSTR* libraryList, pbuint numLibs, LPCSTR commandLine, IPB_Session** session)
Return Values
Examples
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
LPCTSTR szHello = "Hello world";
// Provide command line parameters (employee ids)
// to be passed to the PowerBuilder application
LPCTSTR szcommandline = "102 110";
int wmId, wmEvent, ret;
PAINTSTRUCT ps;
HDC hdc;
switch (message)
{
case WM_CREATE:
{
hPBVMInst = ::LoadLibrary("pbvm170.dll");
P_PB_GetVM getvm = (P_PB_GetVM)
GetProcAddress(hPBVMInst,"PB_GetVM");
IPB_VM* vm = NULL;
getvm(&vm);
static const char *liblist [] =
{"runapp.pbd"};
vm->RunApplication("runapp", liblist, 1,
szcommandline, &session);
break;
}