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

Thread: How can use VB dll in VC++ code?

  1. #1
    Join Date
    Jan 2008
    Location
    India
    Posts
    780

    How can use VB dll in VC++ code?

    Hi all,

    i have a DLL that is created by VB,
    now i want to use this in my VC++ dialog based mfc application.

    please tell me how can i do this.

    thanks in advance.
    IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    19,581

    Re: How can use VB dll in VC++ code?

    Is it a COM dll (.OCX)?
    Victor Nijegorodov

  3. #3
    Join Date
    Oct 2002
    Location
    Timisoara, Romania
    Posts
    14,360

    Re: How can use VB dll in VC++ code?

    Quote Originally Posted by vjshankwar View Post
    Hi all,

    i have a DLL that is created by VB,
    now i want to use this in my VC++ dialog based mfc application.

    please tell me how can i do this.

    thanks in advance.
    You have to tell us more details about what DLL is and what you want to use from it.
    Marius Bancila
    Home Page
    My CodeGuru articles

    I do not offer technical support via PM or e-mail. Please use vbBulletin codes.

  4. #4
    Join Date
    Jan 2008
    Location
    India
    Posts
    780

    Re: How can use VB dll in VC++ code?

    Actully i want use this code Text tp PDU conversion.

    http://www.scampers.org/steve/sms/samples.htm#pdu

    this is a link of code in VB or C#,

    i want to use this code in VC but im not able to do this,so i decided to create a dll from this code,and now i want to use the dll of this code in my VC++ application,for PDU conversion.

    please help if u provide me guidance to PDU conversion or otherwise use this dll.

    thanks in advance.
    IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH

  5. #5
    Join Date
    Jul 2005
    Location
    E: 120.6, N: 31.3′
    Posts
    795

    Re: How can use VB dll in VC++ code?

    Assume VB DLL name is project1.dll

    The first thing you have to do in VC++ is to add #import ".\\Project1.dll" no_namespace, then
    Code:
    .........
    CoInitialize(NULL);
    _Class1Ptr ptr;
    ptr.CreateInstance(__uuidof(Class1));
    .......
    The above just reference, hope it helps.




    -----------------------------------------------
    If it helps, please Rate this post, thanks!

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)