PxPlus User Forum

Twitter Twitter Twitter

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Mike King

Pages: 1 ... 32 33 [34] 35 36 ... 65
496
Language / Re: INVOKE/SYS() rights on Windows
« on: July 24, 2020, 02:13:40 PM »
No -- only the INVOKE provides for a CONTROL option.

497
Programming / Re: Open file explorer to specific directory?
« on: July 24, 2020, 10:04:35 AM »
Just thought I'd post this...

On my system I have the following program saved in _cmd/shex in my starting directory:

0010 ENTER x$,ERR=*NEXT
0020 LET x$=STP(x$,2)
0030 IF x$="" THEN LET x$=LWD
0040 INVOKE "explorer "+x$
0050 END

This allows me at PxPlus command line to simply enter shex or shex directory and to have the Windows Explorer open.

You could also put this in *cmd/shex for system wide usage.

Note: It would need some tweaking to work under WindX.

498
Language / Re: INVOKE/SYS() rights on Windows
« on: July 22, 2020, 04:41:19 PM »
Technically the INVOKE command will be run using the same userid as you logged on with and with the same rights.

This is much like if you run the Windows command mode from an admin userid.  To get full administrative rights you have to right click the shortcut and select 'Run as Administrator'.  Now if you started PxPlus with a "Run as Administrator" then anything you spawn will also be running as administrator.

If you want to be sure you are launching a system command in administrator mode try:

INVOKE CONTROL "command"

If PxPlus is not already running in Administrator mode the system will ask before running command.  If it is running in administrator mode, the command will simply be executed.

499
Nomads / Re: *WINGRP;CLEAR
« on: July 22, 2020, 09:12:40 AM »
I suspect you have a customized *wingrp on your V5 system since there is no CLEAR entry point in *Wingrp on version 5.

ProvideX (Ver:5.14/MS-WINDOWS) Serial Number:0514-001-xxxxxxx
(c) Copyright 1987-2003 Best Software Canada Ltd. (All rights reserved)
  Website: http://www.pvx.com
->load "*wingrp
->password "password
->ll
 List Labels
0030 ENABLE:
0070 DISABLE:
0110 HIDE:
0170 SHOW:
0230 LOCK:
0280 UNLOCK:
0510 HIDE_ALL:
0520 SHOW_ALL:
0530 ENABLE_ALL:
0540 DISABLE_ALL:
0550 DO_ALL:
1010 GET_CTLS:
1110 BAD_GRP:


We also checked version 4.23 and version 6

500
Language / Re: using dll()
« on: July 20, 2020, 11:32:26 AM »
Actually 0x0001 and 0x00000001L are the same value.  The 'L' at the end tells the compilers that its a 'long' which used to be required when we had 16 Bit OS'es.  Now a long is 64 Bits so it would be 0x0000000000000001L.

Now for values such as 0x00010000L the easiest way to get the numeric value is to provide the value a HEX string and pass it to the DEC function as in DEC($00010000$)

501
Language / Re: using dll()
« on: July 20, 2020, 10:30:39 AM »
Okay -- Using the DLL function requires you to understand the difference between passing data by reference (i.e. a pointer to the data/value) and passing the actual data value.  All parameters passed to the DLL are passed on the stack and that consists of a series of 32/64 bit values so its important to get these right.

Generally if you are calling a DLL function:
  • if you are asked to pass a simple value such as a number or bit mask they want it passed by value.
  • if you are passing a string or structure they want the value passed by reference which is a pointer to the data.
Okay -- So looking at the OpenProcess function it wants 3 values a DWORD with the Access requested, an indicator if you want it Inherted, and a DWORD with the Process ID.  All of these are simple values/bit masks so all need to be passed as values.

This means, given the values you requested the DLL method call would be:

sts = DLL("Kernel32","OpenProcess", 1, 0, 40364)

PxPlus will place these value in the stack and call the specified function.

If you need to pass a pointer to a structure or buffer to a string or such, you create a string to contain the values and simply put the string name in the DLL call in order to have its addressed passed.

It should also be noted that on Windows, functions that work with text often have two definitions, one definition passing 8-BIT ASCII data and one passing 16-Bit Unicode (wide) characters.  For example the FindWindow function actually exists as FindWindowA -- where you can pass a sting containing ASCII data or FindWindowW -- where you can pass a string containing 16 Bit UNICODE.  For the most part, when calling these functions from PxPlus you want the ASCII (xxxxA) function.

Lastly, remember when passing strings, that the functions often want Null terminated strings; that is a string whose last character is $00$ so make sure to add this to the end of whatever string you pass or if receiving a string only use the data up the $00$ byte.

502
Language / Re: Open tcp channel
« on: July 16, 2020, 09:56:48 AM »
Yes, that should have no problem. 

Some of older versions of PxPlus came out before TLS1.2 which is now pretty much mandated by most sites.  Also many sites require SNI support which allows a single TCP/IP address to support multiple site names and is required for certificate validation.  Support for SNI was added in v14.

If you find your site requires TLS1.3, whose official specification was only finalized in August 2018, you will need PxPlus 2020 (v17) as that was the first release after TLS 1.3 was supported on CENTOS, DEBIAN and many other OS'es.

503
Language / Re: Open tcp channel
« on: July 15, 2020, 11:14:53 AM »
You cannot just open a TCP connection with a URL.  To access a URL you open a TCP connection to a server then format and send a request which identifies the URL and potentially the data.

PxPlus however does provide a utility that handles this.  Please check out *plus/web/request at:
https://manual.pvxplus.com/page/Web%20Services/Overview.htm#submitting

Also make sure your PxPlus is reasonably current as over the past few years there have been many changes in SSL.



504
Language / Re: Error 31
« on: July 15, 2020, 10:31:14 AM »
Another thought --- you indicated you got a error 31, that's an out of memory error.  Its possible that *plus/web/request cannot allocate enough memory to hold the response. 

By default PxPlus limits the amount of memory to about 32MB. If the program runs out of memory while receiving the response it will leave the file open.

You may want to tell the system to ignore the memory limits by setting 'IZ'.

505
Language / Re: Error 31
« on: July 15, 2020, 10:26:23 AM »
Jeff

Remove the ERR=*NEXT or at least trap the error.  The program may be having an error and that might be leaving a channel open. 


506
Programming / Re: Nomads Questions.
« on: July 08, 2020, 02:19:51 PM »
The standard multiline does not have the ability to change alignment on the fly, but you can use the SelAlign$ property on RTF multi-line controls.

507
Programming / Re: XCOPY
« on: July 02, 2020, 04:19:34 PM »
Have you consider the PxPlus "CREATE FILE" command?  It will allow you to copy opened files.

Have at look at: https://manual.pvxplus.com/?/directives/create_file.htm


508
Programming / Re: error 288
« on: June 23, 2020, 02:11:37 PM »
If this is occurring printing, its likely your printer is defined as a pipe directly to the device.  As to why the pipe might break would depend on your setup but it could be due to a printer connection error or some other event.

Assuming you are running on a Linux platform, you might consider printing to a file then passing the file to the system spooler using the 'lpr' command with the '-r' option to delete the file once printed.  This should avoid any potential broken pipe.


509
Web Services / Re: Web request returns the program
« on: June 18, 2020, 04:05:08 PM »
If you are getting a listing of your program then the .pxp file on the server is likely not a program file but rather a text file containing the source of the program.

Unlike native PxPlus which will automatically compile a text file to program format in memory, the web server requires that the .pxp files be true compiled program files.

510
Registration and Setup / Re: CCP License Temporary Activation
« on: June 18, 2020, 10:47:13 AM »
For migrating from ProvideX, the upgrade is bit more complicated, specifically because of the location the license file.

The first thing I would do is install the Online activation update for ProvideX that is documented here.  This should let you run the online registration on your ProvideX system.

Once that is done I would contact your supplier to initiate a license move.  Once initiated you should be able to run the online registration on the ProvideX system which will mark its license file for expiration on the first of the next month.  You can then install PxPlus using its installation key and register it.

The move process will provide you time to complete the transition.

Another method that might work on Windows and using ProvideX v8 or later is to set the system Environment variable PVXKEY to the 'lib/keys' directory of your ProvideX system.  You should then be able to install and register PxPlus.  It will share the license with ProvideX.   

On Linux/Unix you can simply use the OS 'ln' command to share the license file (see here for move information on sharing a license file).

Pages: 1 ... 32 33 [34] 35 36 ... 65