Seite 10 von 19

Verfasst: 04.04.2006 11:55
von gnozal
ts-soft hat geschrieben:
Debugger hat geschrieben:ms-help://MS.PSDK.1033
but it comes MSDN :( , not PSDK
Now that's strange :shock:
Does it work with the old jaPBe ?

Verfasst: 04.04.2006 12:07
von ts-soft
gnozal hat geschrieben:Does it work with the old jaPBe ?
Same problem
Only with the new pb-ide it works with psdk

Verfasst: 04.04.2006 12:25
von ts-soft
I have test it and this works :wink: :
thx @DataMiner

Code: Alles auswählen

Procedure SDK_IsAvaiable()
  IsAvaiable = 0
  
  If UseSDK_UseMSDN = #False
    ; PSDK
    If RegCreateKeyEx_(#HKEY_CURRENT_USER, "Software\Microsoft\MSDN\7.0\Help", 0, 0, #REG_OPTION_NON_VOLATILE, #KEY_READ , 0, @NewKey, @KeyInfo) = #ERROR_SUCCESS
      index = 0
      Repeat
        ValueName$ = Space(260)
        ValueNameSize = 260
        ValueData$ = Space(260)
        ValueDataSize = 260
        
        Result = RegEnumValue_(NewKey, index, @ValueName$, @ValueNameSize, 0, @ValueType, 0, 0)      
        
        If Result = #ERROR_SUCCESS And ValueType = #REG_SZ
          
          If Left(LCase(ValueName$),18) = "ms-help://ms.psdk." ; current version: ms-help://MS.PSDK.1033
            PlatformSDKHelpString$ = "ms-help://MS.PSDKSVR2003SP1.1033";ValueName$
            Debug PlatformSDKHelpString$
            IsAvaiable = 1
            
            Break
          EndIf
          
        EndIf
        
        index + 1
      Until Result <> #ERROR_SUCCESS
      
      RegCloseKey_(NewKey)
    EndIf
    ;
  Else
    ; MSDN
    If RegCreateKeyEx_(#HKEY_CURRENT_USER, "Software\Microsoft\MSDN\8.0\Help", 0, 0, #REG_OPTION_NON_VOLATILE, #KEY_READ , 0, @NewKey, @KeyInfo) = #ERROR_SUCCESS 
      index = 0 
      Repeat 
        ValueName$ = Space(260) 
        ValueNameSize = 260 
        ValueData$ = Space(260) 
        ValueDataSize = 260 
        
        Result = RegEnumValue_(NewKey, index, @ValueName$, @ValueNameSize, 0, @ValueType, 0, 0)      
        
        If Result = #ERROR_SUCCESS And ValueType = #REG_SZ 
          
          If Left(LCase(ValueName$),17) = "ms-help://ms.msdn" ; current version: ms-help://MS.PSDK.1033 
            PlatformSDKHelpString$ = ValueName$ 
            Debug PlatformSDKHelpString$
            IsAvaiable = 1 
            
            Break 
          EndIf 
          
        EndIf 
        
        index + 1 
      Until Result <> #ERROR_SUCCESS 
      
      RegCloseKey_(NewKey) 
    EndIf
    ;
  EndIf
  
  ProcedureReturn IsAvaiable
EndProcedure

Verfasst: 04.04.2006 12:29
von gnozal
I have updated jaPBe ; could you test the new version ?
It now looks for "ms-help://ms.psdk" and not for "ms-help://ms.psdk.", so it should work for your "ms-help://MS.PSDKSVR2003SP1.1033" string.

Verfasst: 04.04.2006 12:40
von ts-soft
gnozal hat geschrieben:I have updated jaPBe ; could you test the new version ?
It now looks for "ms-help://ms.psdk" and not for "ms-help://ms.psdk.", so it should work for your "ms-help://MS.PSDKSVR2003SP1.1033" string.
No, doesn't work

Verfasst: 04.04.2006 12:49
von gnozal
It means that we cannot simply use the string in registry ?
If you find "ms-help://MS.PSDK.1033", you have to use "ms-help://MS.PSDKSVR2003SP1.1033" ? It's very difficult for me as I don't have SDK installed : I cannot guess the registry entries ...
We have to find a solution, because "ms-help://MS.PSDKSVR2003SP1.1033" won't work for everybody I fear.
Could you list me your registry entries in HKEY_CURRENT_USER\Software\Microsoft\MSDN\7.0\Help ?

Verfasst: 04.04.2006 12:57
von ts-soft
Bild
:D

Verfasst: 04.04.2006 13:01
von gnozal
Ok, I understand now : you have both entries. That explains a lot.
Thanks !

Verfasst: 04.04.2006 13:23
von gnozal
New version again.
jaPBe chooses MS.PSDKSVR2003SP1.1033 first and then MS.PSDK.1033
Could you please test ?

Code: Alles auswählen

    Protected PlatformSDKHelpStringOLD.s, PlatformSDKHelpStringNEW.s
    IsAvaiable = 0
    ; PSDK
    If RegCreateKeyEx_(#HKEY_CURRENT_USER, "Software\Microsoft\MSDN\7.0\Help", 0, 0, #REG_OPTION_NON_VOLATILE, #KEY_READ , 0, @NewKey, @KeyInfo) = #ERROR_SUCCESS
      index = 0
      Repeat
        ValueName$ = Space(260)
        ValueNameSize = 260
        ValueData$ = Space(260)
        ValueDataSize = 260
        Result = RegEnumValue_(NewKey, index, @ValueName$, @ValueNameSize, 0, @ValueType, 0, 0)      
        If Result = #ERROR_SUCCESS And ValueType = #REG_SZ
          If Left(LCase(ValueName$),17) = "ms-help://ms.psdk"
            If Left(LCase(ValueName$),18) = "ms-help://ms.psdk." ; PSDK old / PSDK new
              PlatformSDKHelpStringOLD = ValueName$
            Else 
              PlatformSDKHelpStringNEW = ValueName$
            EndIf
            IsAvaiable = 1
          EndIf
        EndIf
        index + 1
      Until Result <> #ERROR_SUCCESS
      RegCloseKey_(NewKey)
    EndIf
    ; PDSK New if exist, else PSDK Old
    If IsAvaiable
      If PlatformSDKHelpStringNEW
        PlatformSDKHelpString$ = PlatformSDKHelpStringNEW
      Else
        PlatformSDKHelpString$ = PlatformSDKHelpStringOLD
      EndIf
    EndIf

Verfasst: 04.04.2006 13:32
von ts-soft
It works :allright: