Struggling to code in VB.net

a.s.lorda.s.lord Posts: 32
edited December 1969 in Daz SDK Developer Discussion

Does anyone know how to work with the SDK in the .net framework

The DAZ SDK consists of unmanaged C++ of a load of .h header files and a .lib
Does anyone know how to get to the functions in there via some COM object or something relatively easy, without having to rewrite a couple of hundred C++/CLI wrappers, (or have to relearn a stone-age language)

Comments

  • CluricaunCluricaun Posts: 18
    edited December 1969

    The SDK is written for a 'real' language like C++. It is not meant for fake interpreted ones like VB .Net, C#, Java etc. :) If you insist on using the fake ones then you will have to wrap the SDK with marshalling code to jump through the hoops of switching from unmanaged to managed and vice versa. No two ways about it, and definitely not a simple or small task.

    You will also run into issues with performance - Fake languages do NOT execute as fast as real code, simply because they are interpreted (C# & VB .Net are interpreted, they use the MS P-Code engine), and are layered on top of bloated class libraries like .Net Framework (they are bloated because they are designed to be generic and not for performance).

    So, in summary, take it from a professional developer of 28yrs - Use C++ you WILL make your life easier. And drop the notion that C++ is a dead language. If you did some homework you would find that most of the things you use on a day to day basis are still written in C or C++. Such things as WIndows, your Word Processor, all the graphics tools you use, and pretty much all the game engines.

  • a.s.lorda.s.lord Posts: 32
    edited December 1969

    Thank you for you opinion. I think you may have answered a different question to the one I was asking. I'm not sure if fast=authentic as surely then only raw machine code would count - I am concerned with coding high-level conceptual abstractions rather than tweaking the mechanics - modern technology makes such a tradeoff acceptable. Also note I used the term stone-age (as in late 60's imperative languages on dinosaur computers) rather than dead language; I also used the term relearn.

    I will ask the question in a different way: does anyone know of any SIMPLE tools for techniques for making stuff in the DAZ SDK accessible to VB.NET (Please, I will only accept that there is no "two ways about it" from anyone who has made a significant effort to find a way.

  • cwgantcwgant Posts: 10
    edited December 1969

    As a career VB.NET programmer for many years, I feel your pain. I've written in C++ now for my little project for DAZ and understand why the SDK folks have done what they've done. It's not an issue with .NET. It's an issue with cross-platform compatibility. They've adopted the Qt libraries with C++ in order to allow for other platforms to share whatever feature you would like to add. I hate to admit it, but going back to C++ and the addition of the Qt libraries have allowed me to successfully integrate an idea into DAZ Studio with no worries about other platform compatibility. This isn't a "Bite-the-bullet" thing... it's take a good look at what the makers of the SDK have given freely for what it is. I am grateful and the support here has been pretty good. Please give it a shot. Your plan for a plugin or whatever you want to create for DAZ Studio may be the next coolest thing that "everyone" may want to use. If you want, I, and others can help you get started... it's not as daunting as you think. Just ask.

Sign In or Register to comment.