6 Replies Latest reply on Apr 20, 2018 1:15 PM by gregor

    Unable to set IPIAppIdentity identifier

    SivaR

      Hello All,

      I have the following VB code snippet to set a trusted app identifier from OSISoft. This seems to crash the application on the line [Set AppId = gPISDKObj]. If i comment out that line and the next one it seems to run just fine.

      Any ideas what could be wrong here? We are using PI SDK version 1.3.

       

      Thanks, Appreciate the help!

      Siva

       

      Sub Main

      Dim srv As Server

                 Dim pt As PIPoint

       

                 Dim gPISDKObj As PISDK.PISDK

                 Dim sGuid As String

                 Dim AppId As PISDK.IPIAppIdentity

       

                 On Error GoTo HANDLER

       

                 Set gPISDKObj = New PISDK.PISDK

                 sGuid = "********-****-****-************"

                 Set AppId = gPISDKObj

                 AppId.Identifier = sGuid

       

                 Set srv = gPISDKObj.Servers("PIServer")

                 srv.Open()

       

                 'Get pi point

                 Dim ptatr As PointAttribute

                 Dim stratr As String

       

                 Set pt = srv.PIPoints("OSIDEMO_Clear Fork.Avg 30d Downtime")

       

                 For Each ptatr In pt.PointAttributes

                 stratr = stratr + ptatr.Name + ": " + ptatr.Value + vbCrLf

                 Next

       

                 MsgBox(stratr,vbOkOnly,pt.Name)

       

                 Exit Sub

       

                 HANDLER:

                 MsgBox Err.Description

      End Sub

        • Re: Unable to set IPIAppIdentity identifier
          tramachandran

          Could you provide more information on the exception message?

          I tried this out with PI SDK 1.4 and seems to work without throwing any exceptions.

           

          May I also know the end purpose this code snippet? Why you are using VB, PI SDK, that too not the latest version?

            • Re: Unable to set IPIAppIdentity identifier
              SivaR

              Thyagarajan Ramachandran

              We have customers that use the legacy PI SDK and we need to support them.

              Here is the trace

               

              'statist.exe' (Win32): Loaded 'C:\Program Files\PIPC\pisdk\PISDK.dll'. Symbols loaded.

              'statist.exe' (Win32): Loaded 'C:\Program Files\PIPC\pisdk\sdktrace.dll'. Symbols loaded.

              'statist.exe' (Win32): Loaded 'C:\Windows\System32\loadperf.dll'. Cannot find or open the PDB file.

              'statist.exe' (Win32): Loaded 'C:\Windows\System32\concrt140.dll'. Cannot find or open the PDB file.

              'statist.exe' (Win32): Loaded 'C:\Windows\System32\pdh.dll'. Cannot find or open the PDB file.

              'statist.exe' (Win32): Loaded 'C:\Program Files\PIPC\pisdk\PISDKRegistry.dll'. Symbols loaded.

              The thread 0x4314 has exited with code 0 (0x0).

              'statist.exe' (Win32): Loaded 'C:\source\Debug-x64\stl_gc.dll'. Symbols loaded.

              'statist.exe' (Win32): Loaded 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscoreei.dll'. Cannot find or open the PDB file.

              'statist.exe' (Win32): Loaded 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll'. Cannot find or open the PDB file.

              'statist.exe' (Win32): Loaded 'C:\Windows\System32\msvcr120_clr0400.dll'. Cannot find or open the PDB file.

              'statist.exe' (Win32): Loaded 'C:\Windows\assembly\NativeImages_v4.0.30319_64\mscorlib\5f07b97b8b64b1ad0f3033a0d991a7de\mscorlib.ni.dll'.

              'statist.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'. Cannot find or open the PDB file.

              'statist.exe' (Win32): Loaded 'C:\source\Debug-x64\stl_gc.dll'. Symbols loaded.

              'statist.exe' (Win32): Loaded 'C:\source\Debug-x64\stl_gc.dll'. Symbols loaded.

              'statist.exe' (Win32): Unloaded 'C:\source\Debug-x64\stl_gc.dll'

              'statist.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\source\Debug-x64\stl_gc.dll'. Symbols loaded.

              'statist.exe' (Win32): Loaded 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clrjit.dll'. Cannot find or open the PDB file.

              'statist.exe' (Win32): Loaded 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\diasymreader.dll'. Cannot find or open the PDB file.

              'statist.exe' (Win32): Loaded 'C:\Windows\assembly\NativeImages_v4.0.30319_64\System\53ee74e28149280edf1ea2f270477d71\System.ni.dll'.

              'statist.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll'. Cannot find or open the PDB file.

              'statist.exe' (Win32): Unloaded 'C:\Windows\System32\twinapi.dll'

              'statist.exe' (Win32): Unloaded 'C:\Program Files\Common Files\microsoft shared\ink\tiptsf.dll'

              'statist.exe' (Win32): Unloaded 'C:\Program Files\Common Files\microsoft shared\OFFICE16\MSOXEV.DLL'

              First-chance exception at 0x00000000620E7EA8 (PISDK.dll) in statist.exe: 0xC0000005: Access violation executing location 0x00000000620E7EA8.

            • Re: Unable to set IPIAppIdentity identifier
              gregor

              Hello Sivankumar,

               

              I see we missed mentioning that PI SDK is announced for deprecation. Please accept our apologies!