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
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