I'm using the following code under Win9*/NT and it works fine here.
I just can't try this under WinME/2000, and I'm wondering if there
will be a problem, do I have to use the 32bit-Reg*Ex-versions?
Thanks and regards,
Hanns
------------------
[This message has been edited by Hanns Ackermann (edited November 20, 2000).]
I just can't try this under WinME/2000, and I'm wondering if there
will be a problem, do I have to use the 32bit-Reg*Ex-versions?
Thanks and regards,
Hanns
Code:
#Compile Exe #Register None #Dim All #Include "Win32Api.Inc" Function PbMain Dim HKEY_CLASSES_ROOT AS LONG : HKEY_CLASSES_ROOT = &H80000000 Dim REG_SZ AS LONG : REG_SZ = 1 Dim Path AS ASCIIZ*256 : Path="C:\PBDLL60\BiAS7" Dim KeyName AS ASCIIZ*256 : KeyName = "BiAS" Dim KeyValue AS ASCIIZ*256 : KeyValue = Path+"\BiAS.EXE" + " %1" ' App-Path Dim KeyHandle AS LONG RegCreateKey HKEY_CLASSES_ROOT, KeyName, KeyHandle If ISFALSE(KeyHandle) then EXIT FUNCTION RegSetValue KeyHandle, "shell\open\command", REG_SZ, KeyValue, %MAX_PATH RegCloseKey KeyHandle KeyName = "BiAS\shell\open\command" RegOpenKey HKEY_CLASSES_ROOT,KeyName,KeyHandle If ISFALSE(KeyHandle) then EXIT FUNCTION RegQueryValue HKEY_CLASSES_ROOT,KeyName,Path,%MAX_PATH RegCloseKey KeyHandle Path=MID$(Path,1,INSTR(-1,Path,"\")-1) MsgBox Path ' same as above? KeyName = "BiAS\shell\open\command" ' kill the entry RegDeleteKey HKEY_CLASSES_ROOT, KeyName KeyName = "BiAS\shell\open" RegDeleteKey HKEY_CLASSES_ROOT, KeyName KeyName = "BiAS\shell" RegDeleteKey HKEY_CLASSES_ROOT, KeyName KeyName = "BiAS" RegDeleteKey HKEY_CLASSES_ROOT, KeyName End Function
------------------
[This message has been edited by Hanns Ackermann (edited November 20, 2000).]
Comment