Dear All,
Our customer ask our company to develop external program to read the
current active company and current user id of Vantage.
Therefore, my question is: how to read the current active company and
current user id of vantage by external program? for example, Access
programming, or Visual Basic programming?
I got the following code. It is to trigger external program from progress
procedure and passing
current company id to the external program.
Can anyone modify my program, so that it can pass both current company id and
user id to external executable program?
/*Begin of program*/
/* DEF SHARED VAR cur-comp AS CHAR NO-UNDO. */
DEF VAR cur-comp AS CHAR INIT "TestComp" NO-UNDO.
DEF VAR runnext AS LOGICAL INIT YES.
DEFINE VARIABLE viReturnCode AS INTEGER NO-UNDO.
PROCEDURE ShellExecuteA EXTERNAL "shell32.dll":U:
/* Handle to parent window */
DEFINE INPUT PARAMETER plHWND AS LONG NO-UNDO.
/* Operation to perform: open, print */
DEFINE INPUT PARAMETER pcOperation AS CHARACTER NO-UNDO.
/* Document or executable name */
DEFINE INPUT PARAMETER pcFile AS CHARACTER NO-UNDO.
/* Command line parameters to executable in File */
DEFINE INPUT PARAMETER pcParameters AS CHARACTER NO-UNDO.
/* Default directory */
DEFINE INPUT PARAMETER pcDirectory AS CHARACTER NO-UNDO.
/* whether shown when opened:
0 hidden, 1 normal, minimized 2, maximized 3,
0 if File is a document */
DEFINE INPUT PARAMETER plShowCmd AS LONG NO-UNDO.
/* Return Code: less than or equal to 32 */
DEFINE RETURN PARAMETER plInstance AS LONG NO-UNDO.
END.
RUN ShellExecuteA (0, "open", "C:\MyProgram.exe", cur-comp, "", 1,
OUTPUT viReturnCode).
/*end of program*/
Can anyone advise me?
Christine
--
Webmail
Our customer ask our company to develop external program to read the
current active company and current user id of Vantage.
Therefore, my question is: how to read the current active company and
current user id of vantage by external program? for example, Access
programming, or Visual Basic programming?
I got the following code. It is to trigger external program from progress
procedure and passing
current company id to the external program.
Can anyone modify my program, so that it can pass both current company id and
user id to external executable program?
/*Begin of program*/
/* DEF SHARED VAR cur-comp AS CHAR NO-UNDO. */
DEF VAR cur-comp AS CHAR INIT "TestComp" NO-UNDO.
DEF VAR runnext AS LOGICAL INIT YES.
DEFINE VARIABLE viReturnCode AS INTEGER NO-UNDO.
PROCEDURE ShellExecuteA EXTERNAL "shell32.dll":U:
/* Handle to parent window */
DEFINE INPUT PARAMETER plHWND AS LONG NO-UNDO.
/* Operation to perform: open, print */
DEFINE INPUT PARAMETER pcOperation AS CHARACTER NO-UNDO.
/* Document or executable name */
DEFINE INPUT PARAMETER pcFile AS CHARACTER NO-UNDO.
/* Command line parameters to executable in File */
DEFINE INPUT PARAMETER pcParameters AS CHARACTER NO-UNDO.
/* Default directory */
DEFINE INPUT PARAMETER pcDirectory AS CHARACTER NO-UNDO.
/* whether shown when opened:
0 hidden, 1 normal, minimized 2, maximized 3,
0 if File is a document */
DEFINE INPUT PARAMETER plShowCmd AS LONG NO-UNDO.
/* Return Code: less than or equal to 32 */
DEFINE RETURN PARAMETER plInstance AS LONG NO-UNDO.
END.
RUN ShellExecuteA (0, "open", "C:\MyProgram.exe", cur-comp, "", 1,
OUTPUT viReturnCode).
/*end of program*/
Can anyone advise me?
Christine
--
Webmail