[AccessD] \decompile

Stuart McLachlan stuart at lexacorp.com.pg
Fri Apr 15 17:33:50 CDT 2022


It's actually standard WIn32 API function calls I use in PowerBASIC code, but the only PB 
specific bit is the PAHTNAME$(EXTN,wsFile) which extracts the extension from the file & 
path contained in wsFile.

Any language which can use WIn32API calls can do the same Registry look ups.

That includes VBA if you use the appropriate  function Declarations  

I've just checked the WIn32API_PtrSafe.txt file discussed in October last year.  The 
relevant declarations are at lines 13820-13822 :)
Link to that file:
https://docs.microsoft.com/en-us/office/troubleshoot/office-suite-issues/win32api_ptrsafe-with-64-bit-support

On 15 Apr 2022 at 11:49, John Colby wrote:

> Stuart how does this work?  Is it a script or function run from VBA? 
> Or something else?
> 
> 
> On Wed, Apr 13, 2022 at 5:58 PM Stuart McLachlan
> <stuart at lexacorp.com.pg> wrote:
> 
> > On 13 Apr 2022 at 17:29, John Colby wrote:
> >
> > > Paul, really cool version detection.
> > >...
> > > > > Rem Find the MSAccess executable
> >
> > I just query the registry :)
> >
> >    'Get Access location
> >         dwRetVal =
> > RegOpenKeyEx(%HKEY_CLASSES_ROOT,PATHNAME$(EXTN,wsFIle),0,%key_query_
> > value,hkey)
> >         dwRetVal = regqueryvalueex(hkey,"",0,%reg_sz,wszRetStr,256)
> >         dwRetVal = regclosekey(hkey) dwRetVal =
> >         RegOpenKeyEx(%HKEY_CLASSES_ROOT,wszRetStr &
> > "\SHELL\Open\command" ,0,%key_query_value,hkey)
> >         dwRetVal = regqueryvalueex(hkey,"",0,%reg_sz,wszRetStr,256)
> >         dwRetVal = regclosekey(hkey)
> >
> > wszRetStr now contains something like:
> > "C:\Program Files (x86)\Microsoft Office\Office14\MSACCESS.EXE"
> > /NOSTARTUP "%1" %2 %3 %4 %5 %6 %7 %8 %9
> >
> > --
> > AccessD mailing list
> > AccessD at databaseadvisors.com
> > https://databaseadvisors.com/mailman/listinfo/accessd
> > Website: http://www.databaseadvisors.com
> >
> 
> 
> -- 
> John W. Colby
> Colby Consulting
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> https://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 




More information about the AccessD mailing list