Seite 9 von 19

Verfasst: 03.04.2006 18:36
von gnozal
If you execute this code, what do you have in PlatformSDKHelpString$ ?

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$ = ValueName$
            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$ 
            IsAvaiable = 1 
            
            Break 
          EndIf 
          
        EndIf 
        
        index + 1 
      Until Result <> #ERROR_SUCCESS 
      
      RegCloseKey_(NewKey) 
    EndIf
    ;
  EndIf
  
  ProcedureReturn IsAvaiable
EndProcedure

Verfasst: 03.04.2006 18:40
von ts-soft
it works:

Code: Alles auswählen

          If Left(LCase(ValueName$),18) = "ms-help://ms.psdk." ; current version: ms-help://MS.PSDK.1033
            PlatformSDKHelpString$ = ValueName$
            Debug PlatformSDKHelpString$
            IsAvaiable = 1
            
gives: ms-help://MS.PSDK.1033

Verfasst: 03.04.2006 18:55
von DataMiner
Sorry, but not for me. I had to change the code to:

Code: Alles auswählen

If Left(LCase(ValueName$),17) = "ms-help://ms.psdk" ; current version: ms-help://MS.PSDK.1033
            PlatformSDKHelpString$ = ValueName$
            Debug PlatformSDKHelpString$
            IsAvaiable = 1
            
            Break
          EndIf
because my registry values are:
ms-help://MS.PSDKSVR2003SP1.1033
ms-help://MS.PSDKXPSP2.1033
VS_Docs_Installed

Verfasst: 04.04.2006 08:36
von gnozal
DataMiner hat geschrieben:Sorry, but not for me. I had to change the code to:

Code: Alles auswählen

If Left(LCase(ValueName$),17) = "ms-help://ms.psdk" ; current version: ms-help://MS.PSDK.1033
            PlatformSDKHelpString$ = ValueName$
            Debug PlatformSDKHelpString$
            IsAvaiable = 1
            
            Break
          EndIf
because my registry values are:
ms-help://MS.PSDKSVR2003SP1.1033
ms-help://MS.PSDKXPSP2.1033
VS_Docs_Installed
Ok, I will change this in the next version. Any others problems / remarks ?

Verfasst: 04.04.2006 08:46
von gnozal
ts-soft hat geschrieben:it works:

Code: Alles auswählen

          If Left(LCase(ValueName$),18) = "ms-help://ms.psdk." ; current version: ms-help://MS.PSDK.1033
            PlatformSDKHelpString$ = ValueName$
            Debug PlatformSDKHelpString$
            IsAvaiable = 1
            
gives: ms-help://MS.PSDK.1033
If this is correct, I don't understand why the help is calling MSDN and not PSDK.
Could you debug jaPBe.pb (download the sources) and tell me the values (in the debugger) for PlatformSDKHelpString$ and UseSDK after you called F1 ?

Verfasst: 04.04.2006 09:08
von ts-soft
gnozal hat geschrieben: Could you debug jaPBe.pb (download the sources) and tell me the values (in the debugger) for PlatformSDKHelpString$ and UseSDK after you called F1 ?
sorry, can't compile jaPBe.pb, only error messages :(
doesn't run in PB4 and doesn't run in PB3.94 (No SubSytem, don't load the
Compiler)

Verfasst: 04.04.2006 09:30
von gnozal
ts-soft hat geschrieben:
gnozal hat geschrieben: Could you debug jaPBe.pb (download the sources) and tell me the values (in the debugger) for PlatformSDKHelpString$ and UseSDK after you called F1 ?
sorry, can't compile jaPBe.pb, only error messages :(
doesn't run in PB4 and doesn't run in PB3.94 (No SubSytem, don't load the
Compiler)
You need PB3.94 and the whole jaPBeForPB400.7z archive

Verfasst: 04.04.2006 09:41
von ts-soft
PB 3.94 IDE gives error: constant not found an so on
jaPBe V3 with pbcompiler 3.94 gives error: no subsystem found, can't start compiler but found it, an so on :(

Verfasst: 04.04.2006 10:16
von gnozal
ts-soft hat geschrieben:PB 3.94 IDE gives error: constant not found an so on
jaPBe V3 with pbcompiler 3.94 gives error: no subsystem found, can't start compiler but found it, an so on :(
I forgot : you have to compile the sources with the 'old' jaPBe for PB3.94 (because of the #jaPBe_* constants), and place the SCILEXER.DLL in \Compilers.

Verfasst: 04.04.2006 10:54
von ts-soft
Debugger hat geschrieben:ms-help://MS.PSDK.1033
but it comes MSDN :( , not PSDK