main@magicu-l.groups.io Notification <noreply@...>
The following files have been uploaded to
the Files area of the main@magicu-l.groups.io group.
By: Steven Blank
Description:
Magic xpa v3.3g project export illustrating one way to limit each user to only one uniquely-named instance of the runtime at a time. Source code is provided as is, with no warranty, for the purpose of demonstration only.
|
|
Re: Issue with @user32.FindWindowA and XPA

Steven Blank
It should, and it does, now, when I hold my mouth right.
It turns out that I had to change the way I was obtaining a handle
to the MDI window.
I had been calling '@user32.GetParent' and passing the expression
WinHWND(0) as the handle. In uniPaaS and earlier, when executed in a
batch task called from the Main program's Task Prefix, this call
returned a handle to the MDI.
In xpa3, I have to instead call '@user32.GetAncestor' and pass the
expression WinHWND(0) as the handle. Everything else remains the
same.
I'll put a copy in our forum's shared files area.
Steve
toggle quoted messageShow quoted text
On 11/12/2020 4:43 PM, sherman levine
wrote:
Would that no longer work in XPA?
Sherm,
That's how it was working, yes.
Steve
On 11/12/2020 3:52 PM, sherman
levine wrote:
Steve,
Would this sequence work ?
1. Calculate permanent title
(e.g. MyApplication_MyWorkstationName)
2. Look for existing permanent title (with
@User32.FindWindowA)
3. If permanent title exists already,
go there (@user32.ShowWindow) and raise exit system here
else
rename myself permanent title
endif
On 11/12/2020 6:36 PM, Steven
Blank wrote:
Graham,
I've been playing with this in xpa3 and find that the
behavior has definitely changed with regard to the main
window caption.
First off, in xpa3, the Application Properties dialog
(Ctrl+Shift+P) no longer has Caption or Icon properties,
apparently because the Main program's Form name is what's
being displayed, not the MDI window's name.
On the one hand, this seed-change makes changing the main
form's caption dynamically, at runtime, drop dead simple:
reference a variable in the Form name property's
Expression and then update the referenced variable as
desired. Works great.
On the other hand, this also renders the technique to
locate another instance useless, at least as is, so it's
back to the drawing board for, possibly, a whole new
approach.
🙁
I'll continue to futz with it and, if I can figure it out,
I'll share it with you.
Steven G. Blank
SGBlank Consulting
On 11/12/2020 2:23 PM, Steven
Blank wrote:
Graham,
In your call to user32.FindWindowA, the second argument
('WindowsForms10.Window.8.app.0.141b42a_r14_ad1') is the
class name of the window you're attempting to find and
it appears that you may have hard coded this in your
application. If so, then my first guess would be that
the hard-coded class name is still that of the prior
version (uniPaaS) and not the new version (xpa) and my
second guess would be that it's just incorrect.
In my Instance Manager, I make two preceding calls to
user32.GetParent and user32.GetClassName to obtain the
runtime window's class name dynamically.
HTH.
Steven G. Blank
SGBlank Consulting
On 11/12/2020 1:03 PM,
Graham White wrote:
Hi,
We have some logic in our
XPA3.3 application that upon starting checks to
see if there is another instance of the
application running it will close the one that has
just been launched, however, this seems to have
stopped working and I am not sure why or when.
Here is our scenario..
We have 2 databases one for New
Zealand and one for Australia. We the user starts
our menu application they select which country,
the logical name pointers to the location of the
database are set and the application is launched
perfect. They can then launch another one but can
only go into the other country if they try to go
into the same country the system closes the window
and exits. How we have done this is by us
changing the window title to the country name and
checking if there is another window open with the
same name. This has worked but at some point (new
server, hardware windows updates??) it has
stopped.
The code we use is as follows…
If CtxGetName()='Main'
Invoke UDP
@user32.FindWindowA with Arguments – ‘ AA4’,
'WindowsForms10.Window.8.app.0.141b42a_r14_ad1',
'Instance Manager', virtual ‘hWndThis’ N10
Invoke UDP
@user32.FindWindowA with Arguments – ‘ AA4’,
'WindowsForms10.Window.8.app.0.141b42a_ r14_ad1',
'This_Country_Name', virtual ‘hWndThat’ N10
If hWndThat<>0 and hWndThis<> hWndThat
Invoke UDP @user32.ShowWindow with Arguments -
'440', hWndThat,3
Block End
Block End
I am not 100% sure of exactly
why/how it does/does not work or in fact if it’s
the best way of doing it. I would appreciate any
assistance if figuring out why it doesn’t work or
a better way of doing it.
Regards
Graham
White
Software
Developer
Graham.White@...
EC
Credit Control | eccreditcontrol.com
<image001.png>
IMPORTANT NOTICE: This e-mail
message and any attachments are confidential to
EC Credit Control and subject to legal privilege
(which is not waived or
lost by
mistaken delivery). If you have received this
e-mail in error, please advise the sender
immediately and destroy the message and any
attachments.
If you are not the intended
recipient you are notified that any use,
distribution, amendment, copying or any action
taken or omitted to be taken in reliance of
this message
or attachments is prohibited. EC Credit Control
collects personal information to provide and
market our services (see our privacy policy at:
www.eccreditcontrol.co.nz – www.eccreditcontrol.com - www.eccreditcontrol.com.au for more information about use,
disclosure and access).
EC Credit Control’s liability
in connection with transmitting, unauthorised
access to, or viruses in this message and its
attachments is limited to resupply of
any
affected message or attachments.
|
|
Re: Issue with @user32.FindWindowA and XPA
Would that no longer work in XPA?
toggle quoted messageShow quoted text
On Nov 12, 2020, at 19:08, Steven Blank <sgblank@...> wrote:
Sherm,
That's how it was working, yes.
Steve
On 11/12/2020 3:52 PM, sherman levine
wrote:
Steve,
Would this sequence work ?
1. Calculate permanent title (e.g.
MyApplication_MyWorkstationName)
2. Look for existing permanent title (with @User32.FindWindowA)
3. If permanent title exists already,
go there (@user32.ShowWindow) and raise exit system here
else
rename myself permanent title
endif
On 11/12/2020 6:36 PM, Steven Blank
wrote:
Graham,
I've been playing with this in xpa3 and find that the behavior
has definitely changed with regard to the main window caption.
First off, in xpa3, the Application Properties dialog
(Ctrl+Shift+P) no longer has Caption or Icon properties,
apparently because the Main program's Form name is what's being
displayed, not the MDI window's name.
On the one hand, this seed-change makes changing the main form's
caption dynamically, at runtime, drop dead simple: reference a
variable in the Form name property's Expression and then update
the referenced variable as desired. Works great.
On the other hand, this also renders the technique to locate
another instance useless, at least as is, so it's back to the
drawing board for, possibly, a whole new approach.
🙁
I'll continue to futz with it and, if I can figure it out, I'll
share it with you.
Steven G. Blank
SGBlank Consulting
On 11/12/2020 2:23 PM, Steven Blank
wrote:
Graham,
In your call to user32.FindWindowA, the second argument
('WindowsForms10.Window.8.app.0.141b42a_r14_ad1') is the class
name of the window you're attempting to find and it appears
that you may have hard coded this in your application. If so,
then my first guess would be that the hard-coded class name is
still that of the prior version (uniPaaS) and not the new
version (xpa) and my second guess would be that it's just
incorrect.
In my Instance Manager, I make two preceding calls to
user32.GetParent and user32.GetClassName to obtain the runtime
window's class name dynamically.
HTH.
Steven G. Blank
SGBlank Consulting
On 11/12/2020 1:03 PM, Graham
White wrote:
Hi,
We have some logic in our XPA3.3
application that upon starting checks to see if there is
another instance of the application running it will
close the one that has just been launched, however, this
seems to have stopped working and I am not sure why or
when. Here is our scenario..
We have 2 databases one for New
Zealand and one for Australia. We the user starts our
menu application they select which country, the logical
name pointers to the location of the database are set
and the application is launched perfect. They can then
launch another one but can only go into the other
country if they try to go into the same country the
system closes the window and exits. How we have done
this is by us changing the window title to the country
name and checking if there is another window open with
the same name. This has worked but at some point (new
server, hardware windows updates??) it has stopped.
The code we use is as follows…
If CtxGetName()='Main'
Invoke UDP
@user32.FindWindowA with Arguments – ‘ AA4’,
'WindowsForms10.Window.8.app.0.141b42a_r14_ad1',
'Instance Manager', virtual ‘hWndThis’ N10
Invoke UDP
@user32.FindWindowA with Arguments – ‘ AA4’,
'WindowsForms10.Window.8.app.0.141b42a_ r14_ad1',
'This_Country_Name', virtual ‘hWndThat’ N10
If
hWndThat<>0 and hWndThis<> hWndThat
Invoke UDP @user32.ShowWindow with Arguments - '440',
hWndThat,3
Block
End
Block End
I am not 100% sure of exactly why/how
it does/does not work or in fact if it’s the best way of
doing it. I would appreciate any assistance if figuring
out why it doesn’t work or a better way of doing it.
Regards
Graham
White
Software
Developer
Graham.White@...
EC
Credit Control | eccreditcontrol.com
<image001.png>
IMPORTANT NOTICE: This e-mail message and
any attachments are confidential to EC Credit Control
and subject to legal privilege (which is not waived
or
lost by
mistaken delivery). If you have received this e-mail
in error, please advise the sender immediately and
destroy the message and any attachments.
If you are not the intended recipient you
are notified that any use, distribution, amendment,
copying or any action taken or omitted to be taken in
reliance of
this message
or attachments is prohibited. EC Credit Control
collects personal information to provide and market
our services (see our privacy policy at:
www.eccreditcontrol.co.nz – www.eccreditcontrol.com - www.eccreditcontrol.com.au for more information about use,
disclosure and access).
EC Credit Control’s liability
in connection with transmitting, unauthorised access
to, or viruses in this message and its attachments is
limited to resupply of
any
affected message or attachments.
|
|
Re: Issue with @user32.FindWindowA and XPA

Steven Blank
Sherm,
That's how it was working, yes.
Steve
toggle quoted messageShow quoted text
On 11/12/2020 3:52 PM, sherman levine
wrote:
Steve,
Would this sequence work ?
1. Calculate permanent title (e.g.
MyApplication_MyWorkstationName)
2. Look for existing permanent title (with @User32.FindWindowA)
3. If permanent title exists already,
go there (@user32.ShowWindow) and raise exit system here
else
rename myself permanent title
endif
On 11/12/2020 6:36 PM, Steven Blank
wrote:
Graham,
I've been playing with this in xpa3 and find that the behavior
has definitely changed with regard to the main window caption.
First off, in xpa3, the Application Properties dialog
(Ctrl+Shift+P) no longer has Caption or Icon properties,
apparently because the Main program's Form name is what's being
displayed, not the MDI window's name.
On the one hand, this seed-change makes changing the main form's
caption dynamically, at runtime, drop dead simple: reference a
variable in the Form name property's Expression and then update
the referenced variable as desired. Works great.
On the other hand, this also renders the technique to locate
another instance useless, at least as is, so it's back to the
drawing board for, possibly, a whole new approach.
🙁
I'll continue to futz with it and, if I can figure it out, I'll
share it with you.
Steven G. Blank
SGBlank Consulting
On 11/12/2020 2:23 PM, Steven Blank
wrote:
Graham,
In your call to user32.FindWindowA, the second argument
('WindowsForms10.Window.8.app.0.141b42a_r14_ad1') is the class
name of the window you're attempting to find and it appears
that you may have hard coded this in your application. If so,
then my first guess would be that the hard-coded class name is
still that of the prior version (uniPaaS) and not the new
version (xpa) and my second guess would be that it's just
incorrect.
In my Instance Manager, I make two preceding calls to
user32.GetParent and user32.GetClassName to obtain the runtime
window's class name dynamically.
HTH.
Steven G. Blank
SGBlank Consulting
On 11/12/2020 1:03 PM, Graham
White wrote:
Hi,
We have some logic in our XPA3.3
application that upon starting checks to see if there is
another instance of the application running it will
close the one that has just been launched, however, this
seems to have stopped working and I am not sure why or
when. Here is our scenario..
We have 2 databases one for New
Zealand and one for Australia. We the user starts our
menu application they select which country, the logical
name pointers to the location of the database are set
and the application is launched perfect. They can then
launch another one but can only go into the other
country if they try to go into the same country the
system closes the window and exits. How we have done
this is by us changing the window title to the country
name and checking if there is another window open with
the same name. This has worked but at some point (new
server, hardware windows updates??) it has stopped.
The code we use is as follows…
If CtxGetName()='Main'
Invoke UDP
@user32.FindWindowA with Arguments – ‘ AA4’,
'WindowsForms10.Window.8.app.0.141b42a_r14_ad1',
'Instance Manager', virtual ‘hWndThis’ N10
Invoke UDP
@user32.FindWindowA with Arguments – ‘ AA4’,
'WindowsForms10.Window.8.app.0.141b42a_ r14_ad1',
'This_Country_Name', virtual ‘hWndThat’ N10
If
hWndThat<>0 and hWndThis<> hWndThat
Invoke UDP @user32.ShowWindow with Arguments - '440',
hWndThat,3
Block
End
Block End
I am not 100% sure of exactly why/how
it does/does not work or in fact if it’s the best way of
doing it. I would appreciate any assistance if figuring
out why it doesn’t work or a better way of doing it.
Regards
Graham
White
Software
Developer
Graham.White@...
EC
Credit Control | eccreditcontrol.com

IMPORTANT NOTICE: This e-mail message and
any attachments are confidential to EC Credit Control
and subject to legal privilege (which is not waived
or
lost by
mistaken delivery). If you have received this e-mail
in error, please advise the sender immediately and
destroy the message and any attachments.
If you are not the intended recipient you
are notified that any use, distribution, amendment,
copying or any action taken or omitted to be taken in
reliance of
this message
or attachments is prohibited. EC Credit Control
collects personal information to provide and market
our services (see our privacy policy at:
www.eccreditcontrol.co.nz – www.eccreditcontrol.com - www.eccreditcontrol.com.au for more information about use,
disclosure and access).
EC Credit Control’s liability
in connection with transmitting, unauthorised access
to, or viruses in this message and its attachments is
limited to resupply of
any
affected message or attachments.
|
|
Re: Issue with @user32.FindWindowA and XPA
Steve,
Would this sequence work ?
1. Calculate permanent title (e.g.
MyApplication_MyWorkstationName)
2. Look for existing permanent title (with @User32.FindWindowA)
3. If permanent title exists already,
go there (@user32.ShowWindow) and raise exit system here
else
rename myself permanent title
endif
toggle quoted messageShow quoted text
On 11/12/2020 6:36 PM, Steven Blank
wrote:
Graham,
I've been playing with this in xpa3 and find that the behavior has
definitely changed with regard to the main window caption.
First off, in xpa3, the Application Properties dialog
(Ctrl+Shift+P) no longer has Caption or Icon properties,
apparently because the Main program's Form name is what's being
displayed, not the MDI window's name.
On the one hand, this seed-change makes changing the main form's
caption dynamically, at runtime, drop dead simple: reference a
variable in the Form name property's Expression and then update
the referenced variable as desired. Works great.
On the other hand, this also renders the technique to locate
another instance useless, at least as is, so it's back to the
drawing board for, possibly, a whole new approach.
🙁
I'll continue to futz with it and, if I can figure it out, I'll
share it with you.
Steven G. Blank
SGBlank Consulting
On 11/12/2020 2:23 PM, Steven Blank
wrote:
Graham,
In your call to user32.FindWindowA, the second argument
('WindowsForms10.Window.8.app.0.141b42a_r14_ad1') is the class
name of the window you're attempting to find and it appears that
you may have hard coded this in your application. If so, then my
first guess would be that the hard-coded class name is still
that of the prior version (uniPaaS) and not the new version
(xpa) and my second guess would be that it's just incorrect.
In my Instance Manager, I make two preceding calls to
user32.GetParent and user32.GetClassName to obtain the runtime
window's class name dynamically.
HTH.
Steven G. Blank
SGBlank Consulting
On 11/12/2020 1:03 PM, Graham White
wrote:
Hi,
We have some logic in our XPA3.3
application that upon starting checks to see if there is
another instance of the application running it will close
the one that has just been launched, however, this seems
to have stopped working and I am not sure why or when.
Here is our scenario..
We have 2 databases one for New Zealand
and one for Australia. We the user starts our menu
application they select which country, the logical name
pointers to the location of the database are set and the
application is launched perfect. They can then launch
another one but can only go into the other country if they
try to go into the same country the system closes the
window and exits. How we have done this is by us changing
the window title to the country name and checking if there
is another window open with the same name. This has
worked but at some point (new server, hardware windows
updates??) it has stopped.
The code we use is as follows…
If CtxGetName()='Main'
Invoke UDP
@user32.FindWindowA with Arguments – ‘ AA4’,
'WindowsForms10.Window.8.app.0.141b42a_r14_ad1', 'Instance
Manager', virtual ‘hWndThis’ N10
Invoke UDP
@user32.FindWindowA with Arguments – ‘ AA4’,
'WindowsForms10.Window.8.app.0.141b42a_ r14_ad1',
'This_Country_Name', virtual ‘hWndThat’ N10
If
hWndThat<>0 and hWndThis<> hWndThat
Invoke UDP @user32.ShowWindow with Arguments - '440',
hWndThat,3
Block
End
Block End
I am not 100% sure of exactly why/how
it does/does not work or in fact if it’s the best way of
doing it. I would appreciate any assistance if figuring
out why it doesn’t work or a better way of doing it.
Regards
Graham
White
Software
Developer
Graham.White@...
EC
Credit Control | eccreditcontrol.com

IMPORTANT NOTICE: This e-mail message and
any attachments are confidential to EC Credit Control
and subject to legal privilege (which is not waived or
lost by
mistaken delivery). If you have received this e-mail in
error, please advise the sender immediately and destroy
the message and any attachments.
If you are not the intended recipient you
are notified that any use, distribution, amendment,
copying or any action taken or omitted to be taken in
reliance of
this message
or attachments is prohibited. EC Credit Control collects
personal information to provide and market our services
(see our privacy policy at:
www.eccreditcontrol.co.nz – www.eccreditcontrol.com - www.eccreditcontrol.com.au for more information about use, disclosure
and access).
EC Credit Control’s liability
in connection with transmitting, unauthorised access to,
or viruses in this message and its attachments is
limited to resupply of
any
affected message or attachments.
|
|
Re: Issue with @user32.FindWindowA and XPA
Thanks Steven,
I was thinking I could manage this by writing something to a table by user to say which country they are in and removing it when they exit. This would work Ok unless they crash out of magic leaving the table indicating they are still logged in. I am not sure if there is a way to figure that out but will keep working on it.
Regards Graham
|
|
Re: Issue with @user32.FindWindowA and XPA

Steven Blank
Graham,
I've been playing with this in xpa3 and find that the behavior has
definitely changed with regard to the main window caption.
First off, in xpa3, the Application Properties dialog (Ctrl+Shift+P)
no longer has Caption or Icon properties, apparently because the
Main program's Form name is what's being displayed, not the MDI
window's name.
On the one hand, this seed-change makes changing the main form's
caption dynamically, at runtime, drop dead simple: reference a
variable in the Form name property's Expression and then update the
referenced variable as desired. Works great.
On the other hand, this also renders the technique to locate another
instance useless, at least as is, so it's back to the drawing board
for, possibly, a whole new approach.
🙁
I'll continue to futz with it and, if I can figure it out, I'll
share it with you.
Steven G. Blank
SGBlank Consulting
toggle quoted messageShow quoted text
On 11/12/2020 2:23 PM, Steven Blank
wrote:
Graham,
In your call to user32.FindWindowA, the second argument
('WindowsForms10.Window.8.app.0.141b42a_r14_ad1') is the class
name of the window you're attempting to find and it appears that
you may have hard coded this in your application. If so, then my
first guess would be that the hard-coded class name is still that
of the prior version (uniPaaS) and not the new version (xpa) and
my second guess would be that it's just incorrect.
In my Instance Manager, I make two preceding calls to
user32.GetParent and user32.GetClassName to obtain the runtime
window's class name dynamically.
HTH.
Steven G. Blank
SGBlank Consulting
On 11/12/2020 1:03 PM, Graham White
wrote:
Hi,
We have some logic in our XPA3.3
application that upon starting checks to see if there is
another instance of the application running it will close
the one that has just been launched, however, this seems to
have stopped working and I am not sure why or when. Here is
our scenario..
We have 2 databases one for New Zealand
and one for Australia. We the user starts our menu
application they select which country, the logical name
pointers to the location of the database are set and the
application is launched perfect. They can then launch
another one but can only go into the other country if they
try to go into the same country the system closes the window
and exits. How we have done this is by us changing the
window title to the country name and checking if there is
another window open with the same name. This has worked but
at some point (new server, hardware windows updates??) it
has stopped.
The code we use is as follows…
If CtxGetName()='Main'
Invoke UDP
@user32.FindWindowA with Arguments – ‘ AA4’,
'WindowsForms10.Window.8.app.0.141b42a_r14_ad1', 'Instance
Manager', virtual ‘hWndThis’ N10
Invoke UDP
@user32.FindWindowA with Arguments – ‘ AA4’,
'WindowsForms10.Window.8.app.0.141b42a_ r14_ad1',
'This_Country_Name', virtual ‘hWndThat’ N10
If
hWndThat<>0 and hWndThis<> hWndThat
Invoke UDP @user32.ShowWindow with Arguments - '440',
hWndThat,3
Block End
Block End
I am not 100% sure of exactly why/how it
does/does not work or in fact if it’s the best way of doing
it. I would appreciate any assistance if figuring out why
it doesn’t work or a better way of doing it.
Regards
Graham
White
Software
Developer
Graham.White@...
EC Credit
Control | eccreditcontrol.com

IMPORTANT NOTICE: This e-mail message and any
attachments are confidential to EC Credit Control and
subject to legal privilege (which is not waived or
lost by
mistaken delivery). If you have received this e-mail in
error, please advise the sender immediately and destroy
the message and any attachments.
If you are not the intended recipient you are
notified that any use, distribution, amendment, copying or
any action taken or omitted to be taken in reliance of
this message
or attachments is prohibited. EC Credit Control collects
personal information to provide and market our services
(see our privacy policy at:
www.eccreditcontrol.co.nz – www.eccreditcontrol.com - www.eccreditcontrol.com.au for more information about use, disclosure
and access).
EC Credit Control’s liability
in connection with transmitting, unauthorised access to,
or viruses in this message and its attachments is limited
to resupply of
any
affected message or attachments.
|
|
Re: Issue with @user32.FindWindowA and XPA

Steven Blank
Graham,
In your call to user32.FindWindowA, the second argument
('WindowsForms10.Window.8.app.0.141b42a_r14_ad1') is the class name
of the window you're attempting to find and it appears that you may
have hard coded this in your application. If so, then my first guess
would be that the hard-coded class name is still that of the prior
version (uniPaaS) and not the new version (xpa) and my second guess
would be that it's just incorrect.
In my Instance Manager, I make two preceding calls to
user32.GetParent and user32.GetClassName to obtain the runtime
window's class name dynamically.
HTH.
Steven G. Blank
SGBlank Consulting
toggle quoted messageShow quoted text
On 11/12/2020 1:03 PM, Graham White
wrote:
Hi,
We have some logic in our XPA3.3
application that upon starting checks to see if there is
another instance of the application running it will close the
one that has just been launched, however, this seems to have
stopped working and I am not sure why or when. Here is our
scenario..
We have 2 databases one for New Zealand and
one for Australia. We the user starts our menu application
they select which country, the logical name pointers to the
location of the database are set and the application is
launched perfect. They can then launch another one but can
only go into the other country if they try to go into the same
country the system closes the window and exits. How we have
done this is by us changing the window title to the country
name and checking if there is another window open with the
same name. This has worked but at some point (new server,
hardware windows updates??) it has stopped.
The code we use is as follows…
If CtxGetName()='Main'
Invoke UDP
@user32.FindWindowA with Arguments – ‘ AA4’,
'WindowsForms10.Window.8.app.0.141b42a_r14_ad1', 'Instance
Manager', virtual ‘hWndThis’ N10
Invoke UDP
@user32.FindWindowA with Arguments – ‘ AA4’,
'WindowsForms10.Window.8.app.0.141b42a_ r14_ad1',
'This_Country_Name', virtual ‘hWndThat’ N10
If
hWndThat<>0 and hWndThis<> hWndThat
Invoke UDP @user32.ShowWindow with Arguments - '440',
hWndThat,3
Block End
Block End
I am not 100% sure of exactly why/how it
does/does not work or in fact if it’s the best way of doing
it. I would appreciate any assistance if figuring out why it
doesn’t work or a better way of doing it.
Regards
Graham
White
Software
Developer
Graham.White@...
EC
Credit Control | eccreditcontrol.com

IMPORTANT NOTICE: This e-mail message and any
attachments are confidential to EC Credit Control and
subject to legal privilege (which is not waived or
lost by
mistaken delivery). If you have received this e-mail in
error, please advise the sender immediately and destroy the
message and any attachments.
If you are not the intended recipient you are
notified that any use, distribution, amendment, copying or
any action taken or omitted to be taken in reliance of
this message
or attachments is prohibited. EC Credit Control collects
personal information to provide and market our services (see
our privacy policy at:
www.eccreditcontrol.co.nz – www.eccreditcontrol.com - www.eccreditcontrol.com.au for more information about use, disclosure and
access).
EC Credit Control’s liability
in connection with transmitting, unauthorised access to, or
viruses in this message and its attachments is limited to
resupply of
any
affected message or attachments.
|
|
Issue with @user32.FindWindowA and XPA
Hi,
We have some logic in our XPA3.3 application that upon starting checks to see if there is another instance of the application running it will close the one that has just been launched, however, this seems to have stopped working and I am
not sure why or when. Here is our scenario..
We have 2 databases one for New Zealand and one for Australia. We the user starts our menu application they select which country, the logical name pointers to the location of the database are set and the application is launched perfect.
They can then launch another one but can only go into the other country if they try to go into the same country the system closes the window and exits. How we have done this is by us changing the window title to the country name and checking if there is another
window open with the same name. This has worked but at some point (new server, hardware windows updates??) it has stopped.
The code we use is as follows…
If CtxGetName()='Main'
Invoke UDP @user32.FindWindowA with Arguments – ‘ AA4’, 'WindowsForms10.Window.8.app.0.141b42a_r14_ad1', 'Instance Manager', virtual ‘hWndThis’ N10
Invoke UDP @user32.FindWindowA with Arguments – ‘ AA4’, 'WindowsForms10.Window.8.app.0.141b42a_ r14_ad1', 'This_Country_Name', virtual ‘hWndThat’ N10
If hWndThat<>0 and hWndThis<> hWndThat
Invoke UDP @user32.ShowWindow with Arguments - '440', hWndThat,3
Block End
Block End
I am not 100% sure of exactly why/how it does/does not work or in fact if it’s the best way of doing it. I would appreciate any assistance if figuring out why it doesn’t work or a better way of doing it.
Regards
Graham White
Software Developer
Graham.White@...
EC Credit Control | eccreditcontrol.com

IMPORTANT NOTICE: This e-mail message and any attachments are confidential to EC Credit Control and subject to legal
privilege (which is not waived or
lost by
mistaken delivery). If you have received this e-mail in error, please advise the sender immediately and destroy the message and any attachments.
If you are not the intended recipient you are notified that any use, distribution, amendment, copying or any action taken
or omitted to be taken in reliance of
this message
or attachments is prohibited. EC Credit Control collects personal information to provide and market our services (see our privacy policy at:
www.eccreditcontrol.co.nz – www.eccreditcontrol.com - www.eccreditcontrol.com.au for
more information about use, disclosure and access).
EC Credit Control’s liability
in connection with transmitting, unauthorised access to, or viruses in this message and its attachments is limited to resupply of
any affected message or attachments.
|
|
Web Service Lite or HTTPCall()?
Hi All
Up to now, because I've been mainly using UP1.5/8, I've successfully used the HTTP functions to call external web services. Now I need to do this in an xpa 3.3 app, so I have the option of using Web Service Lite. I've had a quick play with it, and I'm wondering - what are the advantages of WS Lite over HTTP calls? And what disadvantages, if any?
TIA Mike Bannon DataFormation Ltd., UK
|
|
Re: MySQL server has gone away - UP1.9

JK Heydt
I found the location in the MySQL80 service - path to executable - -defaults-file.
Thanks for the tip about mysqld. I original put in the wrong place.
|
|
Re: MySQL server has gone away - UP1.9
I have in my xamp installation with my.ini name
d:\xampp\mysql\bin\my.ini
You should put it in the [mysqld] section if it is not there.
If it is missing, the default value is: 28800 (8 hours)
regards
Ferenc
2020.11.11. 13:14 keltezéssel, JK Heydt
írta:
toggle quoted messageShow quoted text
Sounds great but I cannot find the "my.cnf" file. Would you be
able to point me at it?
Thank you!
_._,_._,_
|
|
Re: MySQL server has gone away - UP1.9

JK Heydt
Sounds great but I cannot find the "my.cnf" file. Would you be able to point me at it?
Thank you!
|
|
Re: Magic v9.4 PVSW 11 Windows Server 2019
toggle quoted messageShow quoted text
Hi
Currently we are running Magic V9.40 (btrieve) with Pervasive V11 on a Windows Server 2012.
The pervasive - server is going to be updated to a Windows 2019 server (or 2016 depending if magic will work or not).
Will Magic v9.40 work with PVSW 11 on a 2019 server ? or maybe on a 2016 server ?
If not and we upgrade to a higher version of Pervasive will Magic 9.40 be able to work with a pervasive higher then 11 ?
Please advise
I know the compatibility of Pervasive states that in order to work on a 2019 server needs to be V12 according to the Actian website.
Is that a fact ?
Sabrina
|
|
Re: MySQL server has gone away - UP1.9
Hi Marvin,
Thanks for your reply. I've read about these settings in the MySql
documentation. I would interested in the UniPaas behaviour in this
case.
regards
Ferenc
2020.11.11. 11:18 keltezéssel, Lic.
Marvin Vidal írta:
toggle quoted messageShow quoted text
Hi,
The MySQL server has gone away has two main causes:
-
Server timed out and closed the connection. To fix set
this parameters in your my.cnf and restart mysql server:
wait_timeout
= 28800
interactive_timeout = 28800
-
Server dropped an incorrect or too large packet. To fix,
you can increase the max packet size limit and restart
mysql server.
max_allowed_packet
= 128M
I was able to workaround this
error using this parameters, but the main issue would be
your network performance.
Marvin VIDAL
On Wed, Nov 11, 2020 at 2:52
AM Polgár Ferenc < fpolgar@...> wrote:
Hi
All!
One of my customers want to include some data sources from a
remote
server, where there are tables in MySQL. The speed seems to be
enough to
reach it with usable replies.
I wonder if you have experience with such configuration. The
thing I'm
worrying is what happens when the network connection is
breaking even
for a short time.
I got "MySQL server has gone away" message sometimes when
tested the
database connection, but later I set the "Enable automatic
reconnect" on
the ODBC connector setup.
The question is that it helps using by UniPaas? This error
causes a
crash in UniPaas or it really reconnect and goes on?
Is there anything else which should be set to minimize the
possible errors?
TIA
Ferenc
|
|
Re: Magic v9.4 PVSW 11 Windows Server 2019
Hi Sabrina,
We also work with v9.4 and SP8: No problems with all versions of Btrieve v11 and higher. No problems on all Windows Server versions so far.
Hope this will help.
BR, André
|
|
Re: Magic v9.4 PVSW 11 Windows Server 2019
Hi Sabrina,
Magic v9.40 work with PVSW 12 and PVSW 13.
toggle quoted messageShow quoted text
From: main@magicu-l.groups.io <main@magicu-l.groups.io> on behalf of Sabrina Horst <s.horst.meilinkgroep@...>
Sent: November 11, 2020 4:37 AM
To: main@magicu-l.groups.io <main@magicu-l.groups.io>
Subject: [magicu-l] Magic v9.4 PVSW 11 Windows Server 2019
Hi
Currently we are running Magic V9.40 (btrieve) with Pervasive V11 on a Windows Server 2012.
The pervasive - server is going to be updated to a Windows 2019 server (or 2016 depending if magic will work or not).
Will Magic v9.40 work with PVSW 11 on a 2019 server ? or maybe on a 2016 server ?
If not and we upgrade to a higher version of Pervasive will Magic 9.40 be able to work with a pervasive higher then 11 ?
Please advise
I know the compatibility of Pervasive states that in order to work on a 2019 server needs to be V12 according to the Actian website.
Is that a fact ?
Sabrina
|
|
Re: MySQL server has gone away - UP1.9
Hi,
The MySQL server has gone away has two main causes:
-
Server timed out and closed the connection. To fix set this parameters in your my.cnf and restart mysql server:
wait_timeout = 28800 interactive_timeout = 28800
-
Server dropped an incorrect or too large packet. To fix, you can increase the max packet size limit and restart mysql server.
max_allowed_packet = 128M
I was able to workaround this error using this parameters, but the main issue would be your network performance.
Marvin VIDAL
toggle quoted messageShow quoted text
On Wed, Nov 11, 2020 at 2:52 AM Polgár Ferenc < fpolgar@...> wrote: Hi All!
One of my customers want to include some data sources from a remote
server, where there are tables in MySQL. The speed seems to be enough to
reach it with usable replies.
I wonder if you have experience with such configuration. The thing I'm
worrying is what happens when the network connection is breaking even
for a short time.
I got "MySQL server has gone away" message sometimes when tested the
database connection, but later I set the "Enable automatic reconnect" on
the ODBC connector setup.
The question is that it helps using by UniPaas? This error causes a
crash in UniPaas or it really reconnect and goes on?
Is there anything else which should be set to minimize the possible errors?
TIA
Ferenc
|
|
Magic v9.4 PVSW 11 Windows Server 2019
Hi
Currently we are running Magic V9.40 (btrieve) with Pervasive V11 on a Windows Server 2012.
The pervasive - server is going to be updated to a Windows 2019 server (or 2016 depending if magic will work or not).
Will Magic v9.40 work with PVSW 11 on a 2019 server ? or maybe on a 2016 server ?
If not and we upgrade to a higher version of Pervasive will Magic 9.40 be able to work with a pervasive higher then 11 ?
Please advise
I know the compatibility of Pervasive states that in order to work on a 2019 server needs to be V12 according to the Actian website.
Is that a fact ?
Sabrina
|
|
MySQL server has gone away - UP1.9
Hi All!
One of my customers want to include some data sources from a remote server, where there are tables in MySQL. The speed seems to be enough to reach it with usable replies. I wonder if you have experience with such configuration. The thing I'm worrying is what happens when the network connection is breaking even for a short time. I got "MySQL server has gone away" message sometimes when tested the database connection, but later I set the "Enable automatic reconnect" on the ODBC connector setup. The question is that it helps using by UniPaas? This error causes a crash in UniPaas or it really reconnect and goes on? Is there anything else which should be set to minimize the possible errors?
TIA Ferenc
|
|