Announcement

Collapse
No announcement yet.

version 5.1 - VRayInit fails on loadlibrary

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • version 5.1 - VRayInit fails on loadlibrary

    Hello,

    I downloaded AppSDK 5.10.04 version, the following statement not working (in 5.10.01 also, its not working).

    VRayInit init("VRaySDKLibrary", false);

    Getlasterror returns 127 - The specified procedure could not be found error.

    for 3ds max 2018, inside a plugin, i am calling this. All vray related files and folders are inside AppSDK folder and i am linking the header files with this path.

    All solutions from the examples folder getting executed fine.

    With previous versions (4.3), it was working fine.

    What may be the issue? which dll I am missing ?

    Regards,
    Gopinath.

  • #2
    Do you have AppSDK binaries from both V-Ray for 3ds max and an AppSDK standalone installation? You might be mixing incompatible binaries.

    Comment


    • #3
      Hello Stan,

      I am having AppSDK standalone installation binaries only. No Vray for 3ds Max.

      Regards,
      Gopi.

      Comment


      • #4
        It might be that you had the path to 4.3 bin folder in your system PATH variable but you don't have the path to 5.10 bin folder now. Whatever the reason, try to put the full path to VRaySDKLibrary in VRayInit:

        VRayInit init("C:\\vray_appsdk_folder\\bin\\VRaySDKLibrary" , false);

        Comment


        • #5
          Hi Stan,

          I tried by using full path, then also same issue.

          Even if we use full path, in loadlibrary function in _vraysdk_implementation.hpp file,

          hLib = Internal::LoadLibraryW(&convertedPath[0]);

          convertedPath is holding only VraySDKLibrary.dll

          Regards,
          Gopi.

          Comment


          • #6
            convertedPath holds only VRaySDKLibrary.dll because SetDllDirectory is used before LoadLibrary to temporarily set dll search path. It looks like a VRaySDKLibrary.dll dependancy is missing or cannot be found. Can you use Dependency Walker (depends.exe) or Dependencies.exe to load VRaySDKLibrary.dll and check what dependent files might be missing?

            Comment


            • #7
              Hello Stan,

              Please find the attached images - dependencies check.

              one is from 4.3 and other one is 5.1 version dependencies.

              Also, if i run the examples (cpp) in the SDK folder, then it is running fine, it is loading dll and i can able to see the output.

              Regards,
              Gopi.
              Attached Files

              Comment


              • #8
                Is it possible that you build your application as a 32-bit binary executable instead of a 64-bit one? There is a check in the c++ header file but it's better to double check just in case. If the examples work, well, nothing else comes to my mind.

                Comment


                • #9
                  Hello Stan,

                  Our application is 64-bit only (plugin for max 2018 version). The same was working fine with 4.3 version (vray appsdk) till now. I uninstalled 4.3 and installed 5.1, then i am getting this issue.

                  All vray sdk related files are in here only

                  C:\Program Files\Chaos Group\V-Ray\AppSDK

                  I just link the header files from this path in our application.

                  Yes, examples are working fine, that is why i am confused.

                  Regards.
                  Gopi.

                  Comment


                  • #10
                    Adding to the above

                    I just created a small application and running that from some other place, then this is working fine.

                    Calling the function in a plugin which is in 3ds Max 2018 folder, then not working.

                    But, appsdk 4.3 was working fine when calling from 3ds Max 2018 folder.

                    Regards,
                    Gopi.

                    Comment


                    • #11
                      Is it possible that you have an old vray.dll or some other leftover files from V-Ray 4.3 somewhere inside the 3ds Max 2018 folder? I'm confused too and I'm running out of ideas.

                      Comment


                      • #12
                        I double checked stan, there are no left over files. I uninstalled vray appsdk, and i removed whatever leftovers in the whole system and install again. but got the same issue.

                        Let me try uninstalling 3ds Max and install again and will let you know.

                        Regards,
                        Gopi.

                        Comment


                        • #13
                          I got a hint from my colleagues. You can try to change the behavior of LoadLibrary to show you a dialog box with detailed info what exactly fails.
                          https://docs.microsoft.com/en-us/win...i-seterrormode
                          SetErrorMode(0) might do the trick. Call it before VRayInit.

                          Comment


                          • #14
                            Hello Stan,

                            I tried as per your suggestion. I am getting this error message on LoadLibrary. (please find the attached file)

                            I installed and checking with this version of Vray appsdk.

                            appsdk-win_qt5-stable-vray_v5.10.04-20210718.exe


                            Regards,
                            Gopi.

                            Attached Files

                            Comment


                            • #15
                              It seems that a wrong Qt version has been loaded or something Qt related is missing. Version 4.3 didn't use Qt but wxWidgets.
                              Last edited by stanislav.kirilov; 27-07-2021, 06:10 AM.

                              Comment

                              Working...
                              X