Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How would you find ACROPDF.PDF.1 in Registry 1

Status
Not open for further replies.

GuitarSlayer

Programmer
Dec 16, 2004
29
GB
I am trying to write some code to try and determine if
Adobe Acrobat Reader Version 7 (ACROPDF.PDF.1) is present in the registry and am not having much luck. Can any one give me any pointers as how to achieve it.
 
Code:
DECLARE integer RegOpenKey IN WIN32API ;
  	integer	hKey,;			&& handle to open key
	string	lpSubKey,;		&& address of name of subkey to open
	integer@ phkResult		&& address of handle to open key

DECLARE integer RegCloseKey IN WIN32API ;
	integer hKey			&& handle to key to close


FUNCTION FindClassInReg( tcClass as String ) as Logical
	LOCAL	buffer as Integer
	buffer = 0
	IF RegOpenKey(	0x80000000,;	&& HKEY_CLASSES_ROOT
					tcClass,;
					@buffer ) == 0
		RegCloseKey( buffer )
		RETURN .t.
	ENDIF
	RETURN .f.
ENDFUNC

If FindClassInReg( "ACROPDF.PDF.1" ) returns .T. then you've got it, otherwise not.

Volker/
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top