1. Sivaprakash BKR
  2. PowerBuilder
  3. Saturday, 23 December 2023 11:13 AM UTC

Hello,

PB 2022 R2 build 2819 with STD-FC's fn_get_usb_drives function.

It works fine in 32 bit applications, but not in 64 bit applications.   [ clearly stated in framework that it works only in 32 bit applications ]

Any solution or workarounds to get the result in 64 bit applications?

Happiness Always
BKR Sivaprakash

 

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Saturday, 23 December 2023 15:37 PM UTC
  2. PowerBuilder
  3. # 1

Hi BKR;

  Yes, this is one of the last routines that I need to look at for 64 bit compliance. Thank you for bringing it to my attention!

   The STD Framework is currently 98-99% 64 bit compliant. I'll have a look at this routine later today & see if I can refactor it. If not, maybe replace the code with another approach that will make it 64 bit compliant for you.

  BTW: I now have a 2024R1 beta version on the SourceForge website. This version works with PB 2022 R2 currently but will be targeted for 2022 R3 when it goes GA in January.

Regards ... Chris 

Comment
  1. Chris Pollach @Appeon
  2. Sunday, 24 December 2023 03:04 AM UTC
Hi BKR;

The problem lies with Microsoft as they never created a 64 bit equivalent of the Win32_DiskDrive class as supported by its underlying "msscript.ocx" 32 bit control.

So for a 64 bit O/S, we need a 64 bit version of the "msscript.ocx" but alas, MS did not deliver on that.

The good news is that there are a few 64 bit versions of the "msscript.ocx" object. The one tested this evening was the "Tablacus Script Control 64". This is a direct replacement for the MS 32bit version and it's a free open source control that you can download from here: https://tablacus.github.io/scriptcontrol_en.html

I have tested this 64 bit control with the STD Framework's "fn_get_usb_drives" method in W10 & W11 O/S and I can now get the USB drive information OK. All you need to do after installing the Tablacus control is to remove the 64 bit App check around the function code.

I'll keep looking for other API alternatives but this works great for now. I will incorporate this approach in the STD Framework 2024R1 GA release. HTH

Regards ... Chris
  1. Helpful 1
  1. Sivaprakash BKR
  2. Tuesday, 26 December 2023 13:04 PM UTC
Thanks Chris. Started testing this control. Hope this will work for me too...

  1. Helpful
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Saturday, 23 December 2023 15:17 PM UTC
  2. PowerBuilder
  3. # 2

Hi, Sivaprakash -

I suspect very few people in the Community are familiar with this utility and function. Why don't you describe what it does and/or what you are needing to accomplish, and perhaps then someone may be able to offer an alternative?

Best regards, John

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.