RunApplication
Description
Runs the specified application.
Syntax
|
1 |
RunApplication(LPCTSTR applicationName, LPCTSTR* libraryList, pbuint numLibs, LPCSTR commandLine, IPB_Session** session) |
|
Argument |
Description |
|---|---|
|
applicationName |
The name of the application object to be run, in |
|
libraryList |
The library list of the application |
|
numLibs |
The number of libraries in the library |
|
commandLine |
Parameters to be passed to the application |
|
session |
A pointer to IPB_Session*, which will return the |
Return value
PBXRESULT. PBX_OK for success.
Examples
This code fragment loads the PowerBuilder VM and runs an
application called runapp that uses one library, runapp.pbd. It passes
in a command line with two arguments:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
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("pbvm.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; } |
See also
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest