IPB_VM interface:
RunApplication method
Description
Runs the specified application.
Syntax
|
1 |
RunApplication(LPCTSTR   <span>applicationName</span>, LPCTSTR* <span>libraryList</span>, pbuint <span>numLibs</span>, LPCSTR <span>commandLine</span>, IPB_Session**   <span>session</span>) |
|
Argument |
Description |
|---|---|
|
applicationName |
The name of the application object to |
|
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*, |
Return Values
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 |
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)<br>{<br>   LPCTSTR szHello = "Hello world";<br> <br> |
|
1 |
// Provide command line parameters (employee ids)<br>// to be passed to the PowerBuilder application<br>   LPCTSTR szcommandline = "102 110"; <br> <br>   int wmId, wmEvent, ret;<br>   PAINTSTRUCT ps;<br>   HDC hdc;<br> <br>   switch (message) <br>   {<br>      case WM_CREATE:<br>         {<br>         hPBVMInst = ::LoadLibrary("pbvm126.dll");<br> <br>         P_PB_GetVM getvm = (P_PB_GetVM)<br>            GetProcAddress(hPBVMInst,"PB_GetVM");<br> <br>         IPB_VM* vm = NULL;<br> <br>         getvm(&vm);<br> <br>         static const char *liblist [] =<br>            {"runapp.pbd"};<br>         <br>         vm-><span>RunApplication</span>("runapp", liblist, 1,<br>            szcommandline, &session);<br>         <br>         break;<br>         } |
See Also
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest