CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 10 of 10

Thread: C++ and SDK's

  1. #1
    Join Date
    Dec 2011
    Posts
    6

    C++ and SDK's

    Hello -

    I have a situation where I need to include and tap into a vendor's SDK and am not familiar with how to tie the SDK into the application.

    Is anyone out there able to walk me through this process and/or provide a good link for resource?

    The SDK is written in C++ and I am using Visual Studio 2008. The SDK is referencing MFC application.

    Thanks!

  2. #2
    Join Date
    Feb 2002
    Posts
    4,640

    Re: C++ and SDK's

    Get documentation from the vendor. Typically, a "development kit" provides some kind of interface for you to call from your code.

    Viggy

  3. #3
    Join Date
    Jul 2002
    Posts
    2,543

    Re: C++ and SDK's

    Typical using of third-party SDK contains the following steps:
    1. Include third-party h-files to your source files.
    2. Add third-party libraries (.lib) to the linker dependency list.
    3. Call SDK functions from your code.
    4. Ensure that third-party Dll are available at runtime.

    When your program is installed on client computer, third-party SDK runtime installation becomes prerequisite for this program. In the case SDK runtime supports merged modules redistribution, it can be included to your program installation package.

  4. #4
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,620

    Re: C++ and SDK's

    Quote Originally Posted by BuckeyeJane View Post
    I have a situation where I need to include and tap into a vendor's SDK and am not familiar with how to tie the SDK into the application.
    As MrViggy already said, typically this must be explained in SDK documentation a decent vendor should provide as a part of the SDK. Sometimes, sample projects serve to the purpose instead, again been provided as a part of the SDK.

    Is anyone out there able to walk me through this process and/or provide a good link for resource?
    Well, this point is really vague. I wonder how could anybody say something useful about an abstract thing like "a vendor's SDK"? There's no standard for SDKs, or even something close to this. What Alex F described is only a possible use case, a possible variant of SDK structure.

    So, to get some practical advice you really need to be more specific.

    The SDK is written in C++ ... The SDK is referencing MFC application.
    This helps in no way...

    ...and I am using Visual Studio 2008
    ...and this may or may not matter in your case.
    Best regards,
    Igor

  5. #5
    Join Date
    Dec 2011
    Posts
    6

    Re: C++ and SDK's

    Thanks Alex and Viggy!

    I do have the vendor documentation and feel like I'm very close. I'm very very new to C++ (more of a .net developer) and the documentation is stating the following:

    Include the header file (VWCLient.h) after you modify the the following path to point to where the .dll is located:

    #import "C:\PROGRAM fILES\vIEWWISE 6.2 sdk\ClientExt\Bin\VWClient.dll"

    I am assuming that the import statement would be in the stdafx.h header. Is that correct?

  6. #6
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,620

    Re: C++ and SDK's

    #import "C:\PROGRAM fILES\vIEWWISE 6.2 sdk\ClientExt\Bin\VWClient.dll"
    This is what I suspected, it's a COM server. Are you familiar with COM basics?
    Best regards,
    Igor

  7. #7
    Join Date
    Dec 2011
    Posts
    6

    Re: C++ and SDK's

    Also, I updated the the include for the header file in the project options under Linker/General Configuration Area in Visual Studio 2008.. I'm assuming that is the only place that would need the path to point to the library Directories and the the C/C++/ General Area to define the path for the include folders. Is there any other areas that would need this information for the following instruction:

    Include the header file (VWCLient.h) after you modify the the following path to point to where the .dll is located:

    #import "C:\PROGRAM fILES\vIEWWISE 6.2 sdk\ClientExt\Bin\VWClient.dll"

  8. #8
    Join Date
    Dec 2011
    Posts
    6

    Re: C++ and SDK's

    Igor - I am not too familiar with Com basics... Any help you can provide?

  9. #9
    Join Date
    Dec 2011
    Posts
    6

    Re: C++ and SDK's

    I googled the com basics and found the following links for references. Are any of these good tools?

    http://www.codeproject.com/KB/COM/comintro.aspx
    http://www.codeguru.com/cpp/com-tech...icle.php/c5567

  10. #10
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,620

    Re: C++ and SDK's

    Component Object Model (COM)
    COM Clients and Servers
    The #import Directive
    Compiler COM Support Classes

    The trick with COM is: it's not possible to make friends with the technology just by reading a couple of articles. I would say, a couple of years would do.

    Another trick with COM: to be efficient in programming COM client side (your case) you make use of wrapper classes (your case - #import) which just add some level of indirection and obscure little details which might appear important. But to identify the situation you need to understand COM really good.
    Best regards,
    Igor

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured